lkml.org 
[lkml]   [2015]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectd_path() and overlay fs

Hi,

kernel-4.0.0-0.rc4.git1.3.fc23 (I have nothing more recent right now,
sorry it the problem is already fixed).

It seems like d_path() kernel function returns nonsenses for overlay fs.

Example:

# mount -t overlay overlay -olowerdir=/mnt/low,upperdir=/mnt/up/data,workdir=/mnt/up/work /mnt/merged
# dd if=/dev/zero of=/mnt/merged/image count=1 bs=1MiB

# losetup -f /mnt/merged/image

# cat /sys/block/loop0/loop/backing_file
/image


...should be /mnt/merged/image.

drivers/block/loop.c: loop_attr_backing_file_show() uses d_path()

It seems like serious problem because kernel uses d_path() (and
friends) on many places to generate path strings for userspace in
/proc and /sys and people already use overlay fs in containers.

Another example:

# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda6 partition 8191996 258308 -1
/image file 1020 0 -2


Karel

--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com


\
 
 \ /
  Last update: 2015-03-20 14:41    [W:0.105 / U:2.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site