From: Zach Brown <zab@zabbo.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] target/file: fix inclusive vfs_fsync_range() end
Date: Tue, 7 Oct 2014 12:12:44 -0700 [thread overview]
Message-ID: <20141007191244.GA10366@lenny.home.zabbo.net> (raw)
In-Reply-To: <20141007063945.GA4185@infradead.org>
On Mon, Oct 06, 2014 at 11:39:45PM -0700, Christoph Hellwig wrote:
> On Mon, Oct 06, 2014 at 04:40:13PM -0700, Zach Brown wrote:
> > Both of the file target's calls to vfs_fsync_range() got the end offset
> > off by one. The range is inclusive, not exclusive. It would sync a bit
> > more data than was required.
> >
> > The sync path already tested the length of the range and fell back to
> > LLONG_MAX so I copied that pattern in the rw path.
> >
> > This is untested. I found the errors by inspection while following other
> > code.
>
> Maybe it's time to move vfs_fsync_range to a more normal calling
> convention?
Yeah, I wanted to just fix the bugs before going too far.
The current interface does seem like a bad fit. 3 of the 5 non-core
callers got it wrong. They all generate start,end from off,count and
fall back to LLONG_MAX.
I'll put something together if no one beats me to it.
- z
next prev parent reply other threads:[~2014-10-07 19:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 23:40 Zach Brown
2014-10-07 6:39 ` Christoph Hellwig
2014-10-07 19:12 ` Zach Brown [this message]
2014-10-08 6:11 ` 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=20141007191244.GA10366@lenny.home.zabbo.net \
--to=zab@zabbo.net \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.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
all inboxes | Powered by JetHome®