[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240924100552.zcx57qyqg62taszl@quack3>
Date: Tue, 24 Sep 2024 12:05:52 +0200
From: Jan Kara <jack@...e.cz>
To: Zhang Yi <yi.zhang@...weicloud.com>
Cc: Jan Kara <jack@...e.cz>, linux-ext4@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
tytso@....edu, adilger.kernel@...ger.ca, ritesh.list@...il.com,
yi.zhang@...wei.com, chengzhihao1@...wei.com, yukuai3@...wei.com
Subject: Re: [PATCH v2 10/10] ext4: factor out a common helper to lock and
flush data before fallocate
On Tue 24-09-24 16:11:08, Zhang Yi wrote:
> On 2024/9/23 16:54, Jan Kara wrote:
> > On Wed 04-09-24 14:29:25, Zhang Yi wrote:
> > Also the range is wrong for collapse
> > and insert range. There we need to writeout data upto the EOF because we
> > truncate it below.
> >
>
> For collapse and insert range, I passed the length LLONG_MAX, which is
> the same as before, this should've upto the EOF, so I think it's
> right, or am I missing something?
>
> ext4_collapse_range():
>
> - start = round_down(offset, PAGE_SIZE);
> - /* Write out all dirty pages */
> - ret = filemap_write_and_wait_range(mapping, start, LLONG_MAX);
> + ret = ext4_prepare_falloc(file, round_down(offset, PAGE_SIZE),
> + LLONG_MAX, FALLOC_FL_COLLAPSE_RANGE);
>
>
> ext4_insert_range():
>
> - start = round_down(offset, PAGE_SIZE);
> - /* Write out all dirty pages */
> - ret = filemap_write_and_wait_range(mapping, start, LLONG_MAX);
> + ret = ext4_prepare_falloc(file, round_down(offset, PAGE_SIZE),
> + LLONG_MAX, FALLOC_FL_INSERT_RANGE);
>
Ah sorry, I've missed these bits. So we should be fine.
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists