[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <17eebb9f-8ee9-d872-abe0-aa8351755c4d@huaweicloud.com>
Date: Mon, 7 Apr 2025 09:19:48 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Christoph Hellwig <hch@...radead.org>, Yu Kuai <yukuai1@...weicloud.com>
Cc: hch@....de, xni@...hat.com, colyli@...nel.org, axboe@...nel.dk,
agk@...hat.com, snitzer@...nel.org, mpatocka@...hat.com, song@...nel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
dm-devel@...ts.linux.dev, linux-raid@...r.kernel.org, yi.zhang@...wei.com,
yangerkun@...wei.com, "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH RFC v2 02/14] md/md-bitmap: pass discard information to
bitmap_{start, end}write
Hi,
在 2025/04/04 17:29, Christoph Hellwig 写道:
>> int (*startwrite)(struct mddev *mddev, sector_t offset,
>> - unsigned long sectors);
>> + unsigned long sectors, bool is_discard);
>> void (*endwrite)(struct mddev *mddev, sector_t offset,
>> - unsigned long sectors);
>> + unsigned long sectors, bool is_discard);
>
> a bool discard is not a very good interface. I'd expect an op enum or a set
> of flag to properly describe it.
Will update in the next version.
>
> But is start/end write really the right interface for discard or should it
> have it's own set of ops?
Yes, this is historical issue. The old bitmap handle discard the same as
normal write, while new bitmap handle them differently. And I agree that
add a new ops for discard is better in the long term.
Thanks,
Kuai
>
> .
>
Powered by blists - more mailing lists