aboutsummaryrefslogtreecommitdiffstats
path: root/include/xen/xen.h
diff options
context:
space:
mode:
authorHolger Hoffstätte <holger.hoffstaette@googlemail.com>2019-02-12 15:54:24 -0700
committerJens Axboe <axboe@kernel.dk>2019-04-01 08:15:40 -0600
commit56a85fd8376ef32458efb6ea97a820754e12f6bb (patch)
tree434e35600834f0a5f85cfe52ac008e354d30044a /include/xen/xen.h
parentdoc, block, bfq: add information on bfq execution time (diff)
downloadlinux-dev-56a85fd8376ef32458efb6ea97a820754e12f6bb.tar.xz
linux-dev-56a85fd8376ef32458efb6ea97a820754e12f6bb.zip
loop: properly observe rotational flag of underlying device
The loop driver always declares the rotational flag of its device as rotational, even when the device of the mapped file is nonrotational, as is the case with SSDs or on tmpfs. This can confuse filesystem tools which are SSD-aware; in my case I frequently forget to tell mkfs.btrfs that my loop device on tmpfs is nonrotational, and that I really don't need any automatic metadata redundancy. The attached patch fixes this by introspecting the rotational flag of the mapped file's underlying block device, if it exists. If the mapped file's filesystem has no associated block device - as is the case on e.g. tmpfs - we assume nonrotational storage. If there is a better way to identify such non-devices I'd love to hear them. Cc: Jens Axboe <axboe@kernel.dk> Cc: linux-block@vger.kernel.org Cc: holger@applied-asynchrony.com Signed-off-by: Holger Hoffstätte <holger.hoffstaette@googlemail.com> Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Benjamin Gordon <bmgordon@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/xen/xen.h')
0 files changed, 0 insertions, 0 deletions