[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200114215023.GH140865@mit.edu>
Date: Tue, 14 Jan 2020 16:50:23 -0500
From: "Theodore Y. Ts'o" <tytso@....edu>
To: Christoph Hellwig <hch@....de>
Cc: linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Waiman Long <longman@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-ext4@...r.kernel.org, cluster-devel@...hat.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 08/12] ext4: hold i_rwsem until AIO completes
On Tue, Jan 14, 2020 at 05:12:21PM +0100, Christoph Hellwig wrote:
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 0e8708b77da6..b6aa2d249b30 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -4777,9 +4777,6 @@ static long ext4_zero_range(struct file *file, loff_t offset,
> if (mode & FALLOC_FL_KEEP_SIZE)
> flags |= EXT4_GET_BLOCKS_KEEP_SIZE;
>
> - /* Wait all existing dio workers, newcomers will block on i_mutex */
> - inode_dio_wait(inode);
> -
> /* Preallocate the range including the unaligned edges */
> if (partial_begin || partial_end) {
> ret = ext4_alloc_file_blocks(file,
I note that you've dropped the inode_dio_wait() in ext4's ZERO_RANGE,
COLLAPSE_RANGE, INSERT_RANGE, etc. We had added these to avoid
problems when various fallocate operations which modify the inode's
logical->physical block mapping racing with direct I/O (both reads or
writes).
I don't see a replacement protection in this patch series. How does
are file systems supported to protect against such races?
- Ted
Powered by blists - more mailing lists