[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210520135622.44625-1-mcroce@linux.microsoft.com>
Date: Thu, 20 May 2021 15:56:16 +0200
From: Matteo Croce <mcroce@...ux.microsoft.com>
To: linux-block@...r.kernel.org, linux-fsdevel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Lennart Poettering <lennart@...ttering.net>,
Luca Boccassi <bluca@...ian.org>, Jens Axboe <axboe@...nel.dk>,
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>,
Christoph Hellwig <hch@...radead.org>,
JeffleXu <jefflexu@...ux.alibaba.com>
Subject: [PATCH v2 0/6] block: add a sequence number to disks
From: Matteo Croce <mcroce@...rosoft.com>
With this series a monotonically increasing number is added to disks,
precisely in the genhd struct, and it's exported in sysfs and uevent.
This helps the userspace correlate events for devices that reuse the
same device, like loop.
The first patch is the core one, the 2..4 expose the information in
different ways, the 5th increases the seqnum on media change and
the last one increases the sequence number for loop devices upon
attach, detach or reconfigure.
If merged, this feature will immediately used by the userspace:
https://github.com/systemd/systemd/issues/17469#issuecomment-762919781
v1 -> v2:
- increase seqnum on media change
- increase on loop detach
Matteo Croce (6):
block: add disk sequence number
block: add ioctl to read the disk sequence number
block: refactor sysfs code
block: export diskseq in sysfs
block: increment sequence number
loop: increment sequence number
Documentation/ABI/testing/sysfs-block | 12 +++++++
block/genhd.c | 46 ++++++++++++++++++++++++---
block/ioctl.c | 2 ++
drivers/block/loop.c | 5 +++
include/linux/genhd.h | 2 ++
include/uapi/linux/fs.h | 1 +
6 files changed, 64 insertions(+), 4 deletions(-)
--
2.31.1
Powered by blists - more mailing lists