Re: [PATCH] e4defrag: Handle device symlinks

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

 



On Thu, Jul 19, 2012 at 02:02:30PM -0500, Eric Sandeen wrote:
> Device nodes are commonly accessed via symlinks, i.e.
> 
> # ls -l /dev/mapper/testvg-testlv 
> lrwxrwxrwx. 1 root root 7 Jul 19 13:01 /dev/mapper/testvg-testlv -> ../dm-0
> 
> Today, e4defrag on such a device will fail:
> 
> # e4defrag -c /dev/mapper/testvg-testlv 
> File is not regular file
>  "/dev/mapper/testvg-testlv"
> 
> due to it being a link, and e4defrag on the link target does as well:
> 
> # e4defrag -c /dev/dm-0 
> Filesystem is not mounted
> 
> due to the target not being found in /etc/mtab.
> 
> Fix this by checking whether the symlink target is a block device
> and if so, using that device in main(), and also changing get_mount_point()
> to search for a matching device number, not device name.
> 
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>

Thanks, applied.

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


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux