From: Christoph Hellwig <hch@lst.de>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: target-devel <target-devel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] target/file: Drop O_SYNC in favor of implict vfs_fsync_range for writes
Date: Thu, 31 May 2012 07:42:47 +0200 [thread overview]
Message-ID: <20120531054247.GB29553@lst.de> (raw)
In-Reply-To: <1338422263-19874-1-git-send-email-nab@linux-iscsi.org>
On Wed, May 30, 2012 at 11:57:43PM +0000, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> This patch converts fd_execute_cmd() code to drop O_SYNC usage
> (the original default) in favor of always preforming an implict
> SCSI forced unit access (FUA) operation using vfs_fsync_range()
> based on LBA + SectorCount after each completed FILEIO backend write.
>
> This conversion was inspired by Linus's thoughts on O_SYNC usage in
> the thread: http://www.spinics.net/lists/linux-fsdevel/msg55681.html
>
> "O_SYNC is the absolutely anti-thesis of that kind of "multiple levels
> of overlapping IO". Because it requires that the IO is _done_ by the
> time you start more, which is against the whole point."
>
> This patch also drops the now unnecessary fd_buffered_io= token usage
> at createvirtdev time. Tested with lio-core code using fio writeverify
> to local tcm_loop + FILEIO <-> scsi_debug backed LUNs.
If you look at the implementation O_SYNC really just means an implicit
vfs_fsync_range after each write, thus I can't see how this patch makes any
difference.
For target use with WCE=0 semantics you could at least switch to O_DSYNC, though.
next prev parent reply other threads:[~2012-05-31 5:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 23:57 [PATCH] target/file: Drop O_SYNC in favor of implict vfs_fsync_range for writes Nicholas A. Bellinger
2012-05-31 5:42 ` Christoph Hellwig [this message]
2012-05-31 8:25 ` Nicholas A. Bellinger
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=20120531054247.GB29553@lst.de \
--to=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=target-devel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).