linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Treat REQ_FUA and REQ_PREFLUSH as synchronous
@ 2017-05-02 10:21 Jan Kara
  2017-05-02 14:45 ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kara @ 2017-05-02 10:21 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-block, linux-fsdevel

Hello,

Commit b685d3d65ac7 "block: treat REQ_FUA and REQ_PREFLUSH as synchronous"
made requests with REQ_FUA and REQ_PREFLUSH to be treated as synchronous
and dropped REQ_SYNC from definitions of WRITE_FUA and friends. This
however introduced a bunch of bugs to filesystems (I know about ext4,
btrfs, f2fs, gfs2, reiserfs regressing because of this) because they
implicitely expected REQ_FUA or REQ_PREFLUSH implies a synchronous request.
At the first sight they do however generic_make_request_checks() will strip
REQ_FUA and REQ_PREFLUSH flags from a bio if the underlying storage does
not have volatile write cache and so writes suddenly become async. I will
go and fix filesystems to explicitely set REQ_SYNC if they want sync
behavior as that is a good cleanup anyway but I wanted to question whether
it makes sense to treat REQ_FUA and REQ_PREFLUSH ops as synchronous in
op_is_sync() since callers cannot rely on this anyway... Thoughts?

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-05-02 16:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-02 10:21 Treat REQ_FUA and REQ_PREFLUSH as synchronous Jan Kara
2017-05-02 14:45 ` Christoph Hellwig
2017-05-02 14:49   ` Jens Axboe
2017-05-02 15:15     ` Jan Kara
2017-05-02 15:18       ` Christoph Hellwig
2017-05-02 16:29         ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).