From: Omar Sandoval <osandov@osandov.com>
To: linux-block@vger.kernel.org
Cc: kernel-team@fb.com, Hannes Reinecke <hare@suse.de>,
Ming Lei <ming.lei@redhat.com>, Karel Zak <kzak@redhat.com>,
Milan Broz <gmazyland@gmail.com>
Subject: [PATCH 0/4] loop: support different logical block sizes
Date: Thu, 24 Aug 2017 00:03:40 -0700 [thread overview]
Message-ID: <cover.1503558155.git.osandov@fb.com> (raw)
From: Omar Sandoval <osandov@fb.com>
Hi, everyone,
Here's another attempt at supporting different logical block sizes for
loop devices. First, some terminology:
* Logical block size: the lowest possible block size that the storage
device can address.
* Physical block size: the lowest possible sector size that the
hardware can operate on without reverting to read-modify-write
operations. Always greater than or equal to the logical block size.
These are characteristics of the device itself tracked in the
request_queue. For loop devices, both are currently always 512 bytes.
struct block_device also has another block size, basically a "soft"
block size which is the preferred I/O size and can be changed from
userspace. For loop devices, this is PAGE_SIZE if the backing file is a
regular file or otherwise the soft block size of the backing block
device.
Patch 1 simplifies how the soft block size is set. I'm tempted to not
set it at all and use the default of PAGE_SIZE, but maybe someone is
depending on inheriting the soft block size from the backing block
device...
Patch 2 sets the physical block size of loop devices to a more
meaningful value for loop, PAGE_SIZE.
Patch 3 allows us to change the logical block size. It adds a new ioctl
instead of the previous approach (which extends LOOP_{GET,SET}_STATUS).
Hannes, I assume you had a specific reason for doing it the way you did,
care to explain?
Patch 4 is a cleanup.
This is based on my patch reverting the original block size support,
targeting 4.14. Thanks!
Omar Sandoval (4):
loop: get rid of lo_blocksize
loop: set physical block size to PAGE_SIZE
loop: add ioctl for changing logical block size
loop: fold loop_switch() into callers
drivers/block/loop.c | 112 ++++++++++++++++------------------------------
drivers/block/loop.h | 1 -
include/uapi/linux/loop.h | 1 +
3 files changed, 40 insertions(+), 74 deletions(-)
--
2.14.1
next reply other threads:[~2017-08-24 7:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 7:03 Omar Sandoval [this message]
2017-08-24 7:03 ` [PATCH 1/4] loop: get rid of lo_blocksize Omar Sandoval
2017-08-24 12:22 ` Hannes Reinecke
2017-08-24 7:03 ` [PATCH 2/4] loop: set physical block size to PAGE_SIZE Omar Sandoval
2017-08-24 12:23 ` Hannes Reinecke
2017-08-24 7:03 ` [PATCH 3/4] loop: add ioctl for changing logical block size Omar Sandoval
2017-08-24 8:06 ` Karel Zak
2017-08-24 16:31 ` Omar Sandoval
2017-08-24 12:25 ` Hannes Reinecke
2017-08-24 7:03 ` [PATCH 4/4] loop: fold loop_switch() into callers Omar Sandoval
2017-08-24 12:25 ` Hannes Reinecke
2017-08-29 11:33 ` [PATCH 0/4] loop: support different logical block sizes Ming Lei
2017-08-31 19:51 ` Jens Axboe
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=cover.1503558155.git.osandov@fb.com \
--to=osandov@osandov.com \
--cc=gmazyland@gmail.com \
--cc=hare@suse.de \
--cc=kernel-team@fb.com \
--cc=kzak@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.