From: "Holger Hoffstätte" <holger@applied-asynchrony.com>
To: gwendal grignou <gwendal@chromium.org>, linux-kernel@vger.kernel.org
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] loop: properly observe rotational flag of underlying device
Date: Fri, 13 May 2016 00:30:00 +0200 [thread overview]
Message-ID: <573503E8.8040201@applied-asynchrony.com> (raw)
In-Reply-To: <loom.20160511T213516-51@post.gmane.org>
[cc: linux-block]
On 05/12/16 22:28, gwendal grignou wrote:
> Holger Hoffstätte <holger.hoffstaette <at> googlemail.com> writes:
>
>>
>> On 11/11/15 23:08, Holger Hoffstätte wrote:
>>> On 11/11/15 22:29, Jens Axboe wrote:
>>>> On 11/11/2015 08:21 AM, Holger Hoffstätte wrote:
>>>>>
>>>>> 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.
>>>>>
>>>>> Signed-off-by: Holger Hoffstätte <holger.hoffstaette <at>
> googlemail.com>
>
>>
>> Jens,
>>
>> I haven't seen this merged in any trees yet and was wondering if there's
>> any chance to get this into 4.5? If there's something left to fix up
> please
>> let me know.
>>
>> Thanks,
>> Holger
>>
>>
> This patch proved useful for ureadahead: when we use it on a loop device,
> it would use the HDD method to place the data in cache using the pack
> information instead of the SSD method.
>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
I had completely forgotten about this, and apparently so had Jens. ;)
Thanks for the feedback, glad to hear it is useful.
Jens, any objections to merge this for 4.7? It should still apply
cleanly. The original patch was at: https://lkml.org/lkml/2015/11/11/288
Thanks,
Holger
next prev parent reply other threads:[~2016-05-12 22:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 15:21 [PATCH] loop: properly observe rotational flag of underlying device Holger Hoffstätte
2015-11-11 21:29 ` Jens Axboe
2015-11-11 22:08 ` Holger Hoffstätte
2016-01-11 23:20 ` Holger Hoffstätte
2016-05-12 20:28 ` gwendal grignou
2016-05-12 22:30 ` Holger Hoffstätte [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-02-12 22:54 Benjamin Gordon
2019-03-26 16:55 ` Holger Hoffstätte
[not found] ` <CADaYBq32aM4QpHmOmevFWSkjYqWmBWdhgd7CDWh+Se6q_2byHg@mail.gmail.com>
2019-03-26 17:57 ` 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=573503E8.8040201@applied-asynchrony.com \
--to=holger@applied-asynchrony.com \
--cc=gwendal@chromium.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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