Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@inwind.it>
To: Marat Khalili <mkh@rqc.ru>, Hugo Mills <hugo@carfax.org.uk>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: BUG: BTRFS and O_DIRECT could lead to wrong checksum and wrong data
Date: Fri, 15 Sep 2017 19:37:04 +0200	[thread overview]
Message-ID: <dae5a361-6ff4-c64c-81fa-ed58b1d54dff@inwind.it> (raw)
In-Reply-To: <7aa8063a-2f1f-c611-d24a-d5e6a9ceb29b@rqc.ru>

On 09/15/2017 11:50 AM, Marat Khalili wrote:
> May I state my user's point of view:
> 
> I know one applications that uses O_DIRECT, and it is subtly broken
> on BTRFS. I know no applications that use O_DIRECT and are not
> broken. (Really more statistics would help here, probably some exist
> that provably work.) According to developers making O_DIRECT work on
> BTRFS is difficult if not impossible. Isn't it time to disable
> O_DIRECT like ZFS does AFAIU? Data safety is certainly more important
> than performance gain it may or may not give some applications.

I agree with you, but it should be sufficient to disable O_DIRECT when the file has the checksums. I was unable to observe filesystem corruption when the checksums are disabled.

The use cases where O_DIRECT is useful are VM and databasesM and in these cases also nodatacsum/nodatacow are useful.

BR
G.Baroncelli

> 
> --
> 
> With Best Regards, Marat Khalili
> 
> -- To unsubscribe from this list: send the line "unsubscribe
> linux-btrfs" in the body of a message to majordomo@vger.kernel.org 
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

  parent reply	other threads:[~2017-09-15 17:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-14 22:00 BUG: BTRFS and O_DIRECT could lead to wrong checksum and wrong data Goffredo Baroncelli
2017-09-14 22:18 ` Hugo Mills
2017-09-15  6:04   ` Goffredo Baroncelli
2017-09-15  8:26     ` Hugo Mills
2017-09-15  9:50       ` Marat Khalili
2017-09-15 10:12         ` Paul Jones
2017-09-15 17:37         ` Goffredo Baroncelli [this message]
2017-09-15 17:14       ` Goffredo Baroncelli
2017-09-15  3:55 ` Andrei Borzenkov
2017-09-15  5:50   ` Goffredo Baroncelli
2017-09-15 17:01     ` Andrei Borzenkov
2017-09-15 17:30       ` Goffredo Baroncelli
2017-09-15 17:01 ` Liu Bo
2017-09-15 18:57   ` Goffredo Baroncelli
2017-09-15 19:14     ` Liu Bo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dae5a361-6ff4-c64c-81fa-ed58b1d54dff@inwind.it \
    --to=kreijack@inwind.it \
    --cc=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mkh@rqc.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox