linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martijn Coenen <maco@android.com>
To: axboe@kernel.dk, hch@lst.de, ming.lei@redhat.com
Cc: narayan@google.com, zezeozue@google.com, kernel-team@android.com,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	maco@google.com, bvanassche@acm.org, Chaitanya.Kulkarni@wdc.com,
	Martijn Coenen <maco@android.com>
Subject: [PATCH 0/4] Add a new LOOP_SET_FD_AND_STATUS ioctl.
Date: Mon, 20 Apr 2020 10:04:05 +0200	[thread overview]
Message-ID: <20200420080409.111693-1-maco@android.com> (raw)

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


             reply	other threads:[~2020-04-20  8:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20  8:04 Martijn Coenen [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200420080409.111693-1-maco@android.com \
    --to=maco@android.com \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=kernel-team@android.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@google.com \
    --cc=ming.lei@redhat.com \
    --cc=narayan@google.com \
    --cc=zezeozue@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).