linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Andreas Gruenbacher <agruenba@redhat.com>,
	Jan Kara <jack@suse.cz>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-xfs@vger.kernel.org,
	linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 5/5] ext4: Switch to iomap for SEEK_HOLE / SEEK_DATA
Date: Sat, 1 Jul 2017 00:03:06 -0700	[thread overview]
Message-ID: <20170701070306.GW5874@birch.djwong.org> (raw)
In-Reply-To: <20170630173740.GB11420@lst.de>

On Fri, Jun 30, 2017 at 07:37:40PM +0200, Christoph Hellwig wrote:
> On Fri, Jun 30, 2017 at 01:51:10PM +0200, Andreas Gruenbacher wrote:
> > Also, ext4 no longer calls inode_lock or inode_lock_shared; that needs
> > to be added back for consistency between reading i_size and walking
> > the file extents.
> 
> At least for XFS we never had such a consistency as we never took
> the iolock (aka i_rwsem).

Do we need it?  It seems strange to me that someone else could be
changing the file size while we're trying to use it to scan for holes or
data, but OTOH there are plenty of other places where the kernel
effectively requires that userspace either has synchronized writer
processess with the seeker process or is prepared to deal with the
inconsistent results.  If that's the intended behavior for the
SEEK_{HOLE,DATA} then I guess I can put my fears to rest about XFS /not/
taking the IOLOCK/i_rwsem.

The non-ext4 mechanical parts look ok to me (and test out ok), but I
want to be sure that we don't create a locking mess.  Dave complained in
an earlier thread about lockdep problems because the old code took the
ilock and then started locking pages; since we take the ILOCK
during ->iomap_begin, drop it, and only take page locks during
page_cache_seek_hole_data (which is called from the iomap actor) I think
that particular problem goes away.

(As for the ext4 patch that involves deeper surgery to the ext4 iomap
implementation so you'll have to take that up with Ted...)

--D

> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-07-01  7:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 13:54 lseek SEEK_HOLE / SEEK_DATA fixes and switch to iomap V3.2-hch Christoph Hellwig
2017-06-29 13:54 ` [PATCH 1/5] xfs: remove a whitespace-only line from xfs_fs_get_nextdqblk Christoph Hellwig
2017-07-01  2:45   ` Darrick J. Wong
2017-06-29 13:54 ` [PATCH 2/5] vfs: Add page_cache_seek_hole_data helper Christoph Hellwig
2017-06-29 13:54 ` [PATCH 3/5] vfs: Add iomap_seek_hole and iomap_seek_data helpers Christoph Hellwig
2017-06-29 13:54 ` [PATCH 4/5] xfs: Switch to iomap for SEEK_HOLE / SEEK_DATA Christoph Hellwig
2017-06-29 13:54 ` [PATCH 5/5] ext4: " Christoph Hellwig
2017-06-30 11:51   ` Andreas Gruenbacher
2017-06-30 12:11     ` Andreas Gruenbacher
2017-06-30 17:37     ` Christoph Hellwig
2017-07-01  7:03       ` Darrick J. Wong [this message]
2017-07-02 15:24         ` Christoph Hellwig
2017-07-03 15:03       ` Andreas Gruenbacher
2017-07-03 16:21         ` Darrick J. Wong
2017-07-03 22:58           ` Dave Chinner
2017-07-07 21:27     ` Andreas Gruenbacher
2017-07-07 21:27     ` [PATCH v4 1/3] ext4: Add missing locking around iomap_seek_{hole,data} Andreas Gruenbacher
2017-07-12  9:17       ` Christoph Hellwig
2017-07-07 21:28     ` [PATCH v4 2/3] iomap: Switch from blkno to physical offset Andreas Gruenbacher
2017-07-12  9:20       ` Christoph Hellwig
2017-07-07 21:28     ` [PATCH v4 3/3] ext4: Add IOMAP_REPORT support for inline data Andreas Gruenbacher
2017-07-25 12:16       ` Jan Kara
2017-07-25 12:19         ` Andreas Gruenbacher
2017-07-25 12:45   ` [PATCH 5/5] ext4: Switch to iomap for SEEK_HOLE / SEEK_DATA Jan Kara
2017-08-29 13:46     ` Andreas Gruenbacher
2017-06-29 18:47 ` lseek SEEK_HOLE / SEEK_DATA fixes and switch to iomap V3.2-hch Darrick J. Wong
2017-06-29 18:53   ` Christoph Hellwig
2017-07-03 15:11     ` Andreas Gruenbacher

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=20170701070306.GW5874@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=agruenba@redhat.com \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@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).