linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add a new LOOP_SET_FD_AND_STATUS ioctl.
@ 2020-04-20  8:04 Martijn Coenen
  2020-04-20  8:04 ` [PATCH 1/4] loop: Refactor size calculation Martijn Coenen
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Martijn Coenen @ 2020-04-20  8:04 UTC (permalink / raw)
  To: axboe, hch, ming.lei
  Cc: narayan, zezeozue, kernel-team, linux-block, linux-kernel, maco,
	bvanassche, Chaitanya.Kulkarni, Martijn Coenen

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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-04-27  7:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20  8:04 [PATCH 0/4] Add a new LOOP_SET_FD_AND_STATUS ioctl Martijn Coenen
2020-04-20  8:04 ` [PATCH 1/4] loop: Refactor size calculation Martijn Coenen
2020-04-20 13:22   ` Bart Van Assche
2020-04-21 11:48     ` Martijn Coenen
2020-04-21 15:26       ` Bart Van Assche
2020-04-20  8:04 ` [PATCH 2/4] loop: Factor out configuring loop from status Martijn Coenen
2020-04-20 13:34   ` Bart Van Assche
2020-04-20 13:49   ` Bart Van Assche
2020-04-21 11:46     ` Martijn Coenen
2020-04-20  8:04 ` [PATCH 3/4] loop: Move loop_set_from_status() and friends up Martijn Coenen
2020-04-20 13:43   ` Bart Van Assche
2020-04-20  8:04 ` [PATCH 4/4] loop: Add LOOP_SET_FD_AND_STATUS ioctl Martijn Coenen
2020-04-22  6:19   ` Christoph Hellwig
2020-04-22  8:06     ` Martijn Coenen
2020-04-22  8:07       ` Christoph Hellwig
2020-04-22 15:10   ` Bart Van Assche
2020-04-27  7:42     ` Martijn Coenen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).