[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200420080409.111693-1-maco@android.com>
Date: Mon, 20 Apr 2020 10:04:05 +0200
From: Martijn Coenen <maco@...roid.com>
To: axboe@...nel.dk, hch@....de, ming.lei@...hat.com
Cc: narayan@...gle.com, zezeozue@...gle.com, kernel-team@...roid.com,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
maco@...gle.com, bvanassche@....org, Chaitanya.Kulkarni@....com,
Martijn Coenen <maco@...roid.com>
Subject: [PATCH 0/4] Add a new LOOP_SET_FD_AND_STATUS ioctl.
This series introduces a new ioctl that makes it possible to atomically
configure a loop device. Previously, if you wanted to set parameters
such as the offset on a loop device, this required calling LOOP_SET_FD
to set the backing file, and then LOOP_SET_STATUS to set the offset.
However, in between these two calls, the loop device is available and
would accept requests, which is generally not desirable.
There are also performance benefits with combining these two ioctls into
one, which is described in more detail in the last change in the series.
Note that this series depends on
"loop: Call loop_config_discard() only after new config is applied."
[0], which I sent as a separate patch as it fixes an unrelated bug.
[0]: https://lkml.org/lkml/2020/3/31/755
Martijn Coenen (4):
loop: Refactor size calculation.
loop: Factor out configuring loop from status.
loop: Move loop_set_from_status() and friends up.
loop: Add LOOP_SET_FD_AND_STATUS ioctl.
drivers/block/loop.c | 309 ++++++++++++++++++++++----------------
include/uapi/linux/loop.h | 6 +
2 files changed, 189 insertions(+), 126 deletions(-)
--
2.26.1.301.g55bc3eb7cb9-goog
Powered by blists - more mailing lists