Bug#669314: NFS: kernel forces trailing slash for export in /proc/self/mounts

2012-10-18 Thread Chris Hiestand
I've applied the patch to Linus' master HEAD 
(43c422eda99b894f18d1cca17bcd2401efaf7bd0, at the time) and the patch seems to 
work fine.

/proc/self/mounts correctly reflects whether or not the user specified to use a 
trailing slash - and nothing is obviously broken.

If the patch looks fine to others, I propose we move this patch into wherever 
is the next step for testing it more broadly:
e.g. Debian experimental, and wherever it needs to go to end up in 
Linus' master branch.

Thanks,
Chris

smime.p7s
Description: S/MIME cryptographic signature


Bug#669314: NFS: kernel forces trailing slash for export in /proc/self/mounts

2012-10-02 Thread Chris Hiestand
I haven't had a chance to test it yet thanks. I'll be too busy until at least 
mid-next week, but I will test it then if nobody beats me to it.

-Chris


On Sep 30, 2012, at 2:23 PM, Jonathan Nieder jrnie...@gmail.com wrote:

 Thanks for looking it over.  Did you get a chance to test Ben's patch?
 
 Curious,
 Jonathan



smime.p7s
Description: S/MIME cryptographic signature


Bug#669314: NFS: kernel forces trailing slash for export in /proc/self/mounts

2012-09-16 Thread Chris Hiestand
I had a couple friends over today and we made a trivial patch to remove 
trailing slashes. We do not know C and have never created a patch for the 
kernel before, so there is undoubtedly a better way to do it. However we hope 
this helps in your efforts.



0001-Fixes-trailing-slash-in-nfs-devname.patch
Description: Binary data

This patch was created from the offending commit (c7f404b40a366). But I've also 
applied it to to Linus Torvalds' master HEAD (3f0c3c8fe30c7) with success.

-Chris

smime.p7s
Description: S/MIME cryptographic signature


Bug#669314: NFS: kernel forces trailing slash for export in /proc/self/mounts

2012-09-16 Thread Chris Hiestand

On Sep 16, 2012, at 7:00 AM, Ben Hutchings wrote:

 This was my first thought - but what if userland provides a device name
 with a slash on the end?  I think we have to report it back with the
 slash in that case.


That is a great point. We could not find any standard as to whether or not 
there should be a trailing slash.
And from all the examples I could find, there seems to be a convention of 
omitting a trailing slash.
However, if userland provides a trailing slash, it would seem appropriate to 
retain it.

As a point of comparison, matching the given input is the behavior of 2.6.32-5 
in Debian Squeeze.
So I think your approach is better.

-Chris

smime.p7s
Description: S/MIME cryptographic signature


Bug#669314: No Reply From Alexander Viro

2012-09-14 Thread Chris Hiestand
Just an update, I emailed Alexander Viro twice and I haven't heard back from 
Alexander Viro or anyone on the kernel development mailing lists.

I am surprised that this issue is being ignored.

--
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/9cd0814e-7d63-4c11-8154-b67715428...@salk.edu



Bug#669314: NFS: kernel forces trailing slash for export in /proc/self/mounts

2012-06-19 Thread Chris Hiestand
Hi Alexander Viro et al,

This is an escalation of Debian Bug #669314 http://bugs.debian.org/669314, 
which I will
re-elaborate in this email for your convenience.

You committed a change to the way the linux kernel reports NFS mounts - now 
with a
trailing slash for the remote export (among other changes). The change happened 
here:
 commit c7f404b40a3665d9f4e9a927cc5c1ee0479ed8f9
 Author: Al Viro v...@zeniv.linux.org.uk
 Date:   Wed Mar 16 06:59:40 2011 -0400
 
 vfs: new superblock methods to override /proc/*/mount{s,info}
 
 a) -show_devname(m, mnt) - what to put into devname columns in mounts,
 mountinfo and mountstats
 b) -show_path(m, mnt) - what to put into relative path column in 
 mountinfo
 
 Leaving those NULL gives old behaviour.  NFS switched to using those.
 
 Signed-off-by: Al Viro v...@zeniv.linux.org.uk
 

The problematic behavior is that NFS exports now have a trailing slash in
/proc/self/mounts.

This still seems to be the case in newer kernels, for example in Debian's
3.3.2-1~experimental.1.

and HEAD in Linus Torvalds' master branch, presently commit:
02edf6abe01610a5fb379df442de3c837ad99467


I believe it is/was convention to leave a trailing slash off of the nfs export
in /etc/fstab, e.g.:
nfsserver:/srv/ubuntu-32 /mnt/ubuntu-32  nfs 
ro,nfsvers=3,soft,intr,tcp,nodev,noatime,nosuid,rsize=32768,wsize=32768

and I'd also expect the same in /proc/self/mounts


Expected Result:
I expect /proc/self/mounts to show (notice no trailing slash on the export):
nfsserver:/srv/ubuntu-32 /mnt/ubuntu-32 nfs 
ro,nosuid,nodev,noatime,vers=3,rsize=32768,wsize=32768,namlen=255,soft,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=198.202.1.1,mountvers=3,mountport=41576,mountproto=tcp,local_lock=none,addr=198.202.1.1
 0 0


Actual Result:
But instead in /proc/self/mounts I get (notice the trailing slash):
nfsserver:/srv/ubuntu-32/ /mnt/ubuntu-32 nfs 
ro,nosuid,nodev,noatime,vers=3,rsize=32768,wsize=32768,namlen=255,soft,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=198.202.1.1,mountvers=3,mountport=41576,mountproto=tcp,local_lock=none,addr=198.202.1.1
 0 0


Rammifications:
This simple change has a lot of implications because lots of things parse
/etc/fstab and /proc/self/mounts, for example system configuration tools
and mount.nfs and umount.nfs.

If you use the former convention and try to umount an export on a newer
kernel it will fail:

user@hostname:/proc/self$ sudo umount.nfs nfsserver:/srv/ubuntu-32
umount.nfs: nfsserver:/srv/ubuntu-32: not found

And if you run sudo mount -va, mount will not recognize that the fstab mounts
have already been mounted; mounting all mounts twice on the same mount point.
This quickly gets messy.

If there is a new convention to display the trailing slash, we need to update
our tools to handle this change. If there is not a new convention, I'd argue
this is a bug.

So is this a new convention or not? What is the appropriate way for Debian to 
move forward?

Thanks,
Chris Hiestand



--
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/8f8193bd-84c6-4905-8789-de7eb2579...@salk.edu



Bug#669314: [squeeze - wheezy regression] nfs: kernel forces trailing slash for export in /proc/self/mounts

2012-06-18 Thread Chris Hiestand

On Jun 17, 2012, at 3:31 PM, Jonathan Nieder wrote:

 I should have said v2.6.39-rc1~460^2^ (nfs: switch NFS from -get_sb()
 to -mount(), 2011-03-16).  So:


Thanks Jonathan,

Based on this tip I tested that commit and neighboring commits and was
able to find the commit that introduced the problem:
c7f404b40a3665d9f4e9a927cc5c1ee0479ed8f9
vfs: new superblock methods to override /proc/*/mount{s,info}

The last commit to be problem free was the previous one:
f8ad9c4bae99854c961ca79ed130a0d11d9ab53c
nfs: nfs_do_{ref,sub}mount() superblock argument is redundant


I think this bug should be fixed before Wheezy becomes stable.

Thanks a lot,
Chris



-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/8f7b9848-6664-4ae6-83ca-4f363be14...@salk.edu



Bug#669314: linux-source-3.2: After mounting nfs export, kernel forces trailing slash for export in /proc/self/mounts

2012-04-18 Thread Chris Hiestand
Package: linux-source-3.2
Version: 3.2.15-1
Severity: normal
Tags: upstream

Dear Maintainer,

I believe it is convention to leave a trailing slash off of the nfs export
in /etc/fstab, e.g.:
nfsserver:/srv/ubuntu-32 /mnt/ubuntu-32  nfs 
ro,nfsvers=3,soft,intr,tcp,nodev,noatime,nosuid,rsize=32768,wsize=32768

I expect /proc/self/mounts to show (notice no trailing slash on the export):
nfsserver:/srv/ubuntu-32 /mnt/ubuntu-32 nfs 
ro,nosuid,nodev,noatime,vers=3,rsize=32768,wsize=32768,namlen=255,soft,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=198.202.1.1,mountvers=3,mountport=41576,mountproto=tcp,local_lock=none,addr=198.202.1.1
 0 0

But instead in /proc/self/mounts I get (notice the trailing slash):
nfsserver:/srv/ubuntu-32/ /mnt/ubuntu-32 nfs 
ro,nosuid,nodev,noatime,vers=3,rsize=32768,wsize=32768,namlen=255,soft,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=198.202.1.1,mountvers=3,mountport=41576,mountproto=tcp,local_lock=none,addr=198.202.1.1
 0 0

This simple change has a lot of implications because lots of things parse 
/proc/self/mounts, for example mount.nfs and umount.nfs

user@hostname:/proc/self$ sudo umount.nfs nfsserver:/srv/ubuntu-32
umount.nfs: nfsserver:/srv/ubuntu-32: not found

And if you run sudo mount -va, mount will not recognize that the fstab mounts 
have already been mounted;
mounting all mounts twice on the same mount point. This quickly gets messy.

If there is a new convention to force the trailing slash in linux-3, we need to 
update our tools to handle
this change. If there is not a new convention, this is a bug.

As a workaround, I can boot into the squeeze kernel, 
linux-image-2.6.32-5-amd64, and the problem
no longer reproduces. This is why I believe it is a problem in the kernel and 
not in nfs-common.

Thanks,
Chris

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (900, 'testing'), (350, 'testing-proposed-updates')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/12 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages linux-source-3.2 depends on:
ii  binutils  2.22-6
ii  bzip2 1.0.6-1

Versions of packages linux-source-3.2 recommends:
ii  gcc   4:4.6.2-4
ii  libc6-dev [libc-dev]  2.13-27
ii  make  3.81-8.1

Versions of packages linux-source-3.2 suggests:
ii  libncurses5-dev [ncurses-dev]  5.9-4
ii  libqt4-dev 4:4.7.4-2

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20120418224506.5139.4861.report...@sagan.snl.salk.edu