linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: target-devel <target-devel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Mike Christie <michaelc@cs.wisc.edu>,
	Hannes Reinecke <hare@suse.de>,
	Roland Dreier <roland@purestorage.com>,
	Andy Grover <agrover@redhat.com>, Christoph Hellwig <hch@lst.de>,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/6] target/file: Re-enable optional fd_buffered_io=1 operation
Date: Wed, 03 Oct 2012 17:02:35 -0700	[thread overview]
Message-ID: <1349308955.28145.183.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20121003114721.GA16209@infradead.org>

On Wed, 2012-10-03 at 07:47 -0400, Christoph Hellwig wrote:
> On Tue, Oct 02, 2012 at 01:16:44PM -0700, Nicholas A. Bellinger wrote:
> >          * Optionally allow fd_buffered_io=1 to be enabled for people
> >          * who want use the fs buffer cache as an WriteCache mechanism.
> >          *
> >          * This means that in event of a hard failure, there is a risk
> >          * of silent data-loss if the SCSI client has *not* performed a
> >          * forced unit access (FUA) write, or issued SYNCHRONIZE_CACHE
> >          * to write-out the entire device cache.
> >          */
> 
> Oh, I get Vlads flame.  This doesn't simply disable O_DSYNC now but also
> sets WCE=1.  In this case I don't really get the point of the patch, why
> can't we simply set it from configfs?
> 

The patch prevents existing user-space code from using fd_buffered_io=1
operation incorrectly regardless of what is being set for
emulate_write_cache device attribute.

Using FILEIO w/o O_DSYNC + emulate_write_cache=0 is certainly a big
no-no regardless of context, so I'd rather enforce the right thing to do
here from kernel code for this special case instead of allowing an
unsafe mode to be enabled by default + set attributes from user-space.

--nab

  reply	other threads:[~2012-10-04  0:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-30  5:58 [PATCH 0/6] target: Reenable buffered FILEIO + add iscsi-target MXDSL logic Nicholas A. Bellinger
2012-09-30  5:58 ` [PATCH 1/6] target/file: Re-enable optional fd_buffered_io=1 operation Nicholas A. Bellinger
2012-10-01  8:46   ` Christoph Hellwig
2012-10-02 19:02     ` Vladislav Bolkhovitin
2012-10-02 20:16     ` Nicholas A. Bellinger
2012-10-03 11:47       ` Christoph Hellwig
2012-10-04  0:02         ` Nicholas A. Bellinger [this message]
2012-09-30  5:58 ` [PATCH 2/6] iscsi-target: Add base MaxXmitDataSegmentLength code Nicholas A. Bellinger
2012-09-30  5:58 ` [PATCH 3/6] iscsi-target: Enable MaxXmitDataSegmentLength operation in login path Nicholas A. Bellinger
2012-09-30  5:58 ` [PATCH 4/6] iscsi-target: Convert incoming PDU payload checks to MaxXmitDataSegmentLength Nicholas A. Bellinger
2012-09-30  5:58 ` [PATCH 5/6] iscsi-target: Add MaxXmitDataSegmentLength connection recovery check Nicholas A. Bellinger
2012-09-30  5:58 ` [PATCH 6/6] iscsi-target: Change iscsi_target_seq_pdu_list.c to honor MaxXmitDataSegmentLength 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=1349308955.28145.183.camel@haakon2.linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=agrover@redhat.com \
    --cc=hare@suse.de \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=roland@purestorage.com \
    --cc=stable@vger.kernel.org \
    --cc=target-devel@vger.kernel.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).