linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs-progs: loopback files cannot be used if the path is too long
@ 2012-10-12 13:55 nirbheek.chauhan
  2012-10-12 13:55 ` [PATCH] Btrfs-progs: fix resolving of loop devices nirbheek.chauhan
  0 siblings, 1 reply; 3+ messages in thread
From: nirbheek.chauhan @ 2012-10-12 13:55 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nirbheek Chauhan

From: Nirbheek Chauhan <nirbheek.chauhan@collabora.co.uk>

If the path to a given loopback file is longer than 64 characters, none of the
Btrfs-progs tools can use it. This is because the size of loopinfo.lo_name
returned by the LOOP_GET_STATUS ioctl is 64.

The attached patch fixes this by fetching the backing file for a loopback device
from /sys/block; which is how `losetup` from util-linux does it as well.

Nirbheek Chauhan (1):
  Btrfs-progs: fix resolving of loop devices

 utils.c |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

-- 
1.7.8.6


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-23  9:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-12 13:55 [PATCH] Btrfs-progs: loopback files cannot be used if the path is too long nirbheek.chauhan
2012-10-12 13:55 ` [PATCH] Btrfs-progs: fix resolving of loop devices nirbheek.chauhan
2012-10-23  9:53   ` Hector Oron

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).