[PATCH] Btrfs-progs: loopback files cannot be used if the path is too long

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Nirbheek Chauhan <nirbheek.chauhan@xxxxxxxxxxxxxxx>

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

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux