[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YNQiDROADP1jGXCJ@infradead.org>
Date: Thu, 24 Jun 2021 07:11:25 +0100
From: Christoph Hellwig <hch@...radead.org>
To: Lennart Poettering <mzxreary@...inter.de>
Cc: Christoph Hellwig <hch@...radead.org>,
Luca Boccassi <bluca@...ian.org>,
Matteo Croce <mcroce@...ux.microsoft.com>,
linux-block@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>,
Damien Le Moal <damien.lemoal@....com>,
Tejun Heo <tj@...nel.org>,
Javier Gonz??lez <javier@...igon.com>,
Niklas Cassel <niklas.cassel@....com>,
Johannes Thumshirn <johannes.thumshirn@....com>,
Hannes Reinecke <hare@...e.de>,
Matthew Wilcox <willy@...radead.org>,
JeffleXu <jefflexu@...ux.alibaba.com>
Subject: Re: [PATCH v3 6/6] loop: increment sequence number
On Wed, Jun 23, 2021 at 05:29:17PM +0200, Lennart Poettering wrote:
> I am not sure I grok your point.
You don't.
> 1. First of all, loopback devices currently don't hook into the media
> change logic (which so far is focussed on time-based polling
> actually, for both CDs and floppies).
And that is the whole problem. We need to first fix loop devices to
hook into the existing mechanism to report media changes. We can then
enhance that mechanism to be more suitable to loop (avoid the polling)
and userspace (add a sequence number). But if we don't have the basic
agreement to fully integreat loop with the existing way that the kernel
reports media change we don't even need to discuss this series and can
just ignore it, as it simply won't be acceptable.
> Adding this would change
> semantics visibly to userspace (since userspace would suddenly see
> another action=change + DISK_MEDIA_CHANGE=1 uevent suddenly that it
> needs to handle correctly).
Yes, and that is a good thing as loop is currently completely broken
in this respect.
> 2. We want seqnums to be allocated for devices not only when doing
> media change (e.g. when attaching or detaching a loopback device)
> but also when allocating a block device, so that even before the
> first media change event a block device has a sequence number. This
> means allocating a sequence number for block devices won't be
> limited to the media change code anyway.
Doing this on creation is fine, and attaching is by definition a media
change.
Powered by blists - more mailing lists