Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Florian Margaine <florian.margaine@commerceguys.com>
To: Karel Zak <kzak@redhat.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: Fix partitioned loop devices resolve.
Date: Mon, 9 Nov 2015 15:14:23 +0100	[thread overview]
Message-ID: <5640AA3F.2030008@commerceguys.com> (raw)
In-Reply-To: <20151109141256.GW19508@ws.net.home>

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]



On 11/09/2015 03:12 PM, Karel Zak wrote:
> On Mon, Nov 09, 2015 at 02:06:26PM +0100, Florian Margaine wrote:
>> Instead of using string functions to extract the device name and reading
>> this file, this patch uses the loop device API through ioctl to get the
>> correct backing file.
> 
>     #define LO_NAME_SIZE    64
> 
>     struct loop_info64 {
>         ...
>         uint8_t         lo_file_name[LO_NAME_SIZE];
>     };
> 
> 
> The loopdev is based on file descriptor, the lo_file_name[] is hint
> only and it does not have to match with the real path and the most
> important problem is that it uses 64-bytes buffer.
> 
> For losetup we use LOOP_GET_STATUS64 ioctl as fallback solution only.

So btrfs-progs should do the same? Use the /sys filesystem by default,
and use ioctl if it doesn't find the file?

> 
>     Karel
> 
> 

-- 
Florian Margaine

Product Engineer @ Platform.sh
https://platform.sh

https://keybase.io/fmargaine


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-11-09 14:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 13:06 [PATCH] btrfs-progs: Fix partitioned loop devices resolve Florian Margaine
2015-11-09 14:12 ` Karel Zak
2015-11-09 14:14   ` Florian Margaine [this message]
2015-11-10  8:35   ` Florian Margaine
2015-11-10 11:50     ` Karel Zak
2015-11-12  9:10       ` Florian Margaine
2015-11-13 17:16         ` David Sterba

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=5640AA3F.2030008@commerceguys.com \
    --to=florian.margaine@commerceguys.com \
    --cc=kzak@redhat.com \
    --cc=linux-btrfs@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