[PATCH] nfs: Add "lookupcache" to displayed mount options

Previous thread: Re: [2.6.35] AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40 BUG: unable to handle kernel NULL pointer dereference at 0000000000000198 by Sander Eikelenboom on Tuesday, August 10, 2010 - 9:57 am. (13 messages)

Next thread: Linux 2.6.27.50 by Greg KH on Tuesday, August 10, 2010 - 11:46 am. (2 messages)
From: Patrick J. LoPresti
Date: Tuesday, August 10, 2010 - 11:36 am

Running "cat /proc/mounts" fails to display the "lookupcache" option.
This oversight cost me a bunch of wasted time recently.

The following simple patch fixes it.

CC: stable <stable@kernel.org>
Signed-off-by: Patrick LoPresti <lopresti@gmail.com>

--- linux-2.6.35/fs/nfs/super.c~	2010-08-01 15:11:14.000000000 -0700
+++ linux-2.6.35/fs/nfs/super.c	2010-08-10 11:08:22.000000000 -0700
@@ -652,6 +652,13 @@ static void nfs_show_mount_options(struc
 
 	if (nfss->options & NFS_OPTION_FSCACHE)
 		seq_printf(m, ",fsc");
+
+	if (nfss->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG) {
+		if (nfss->flags & NFS_MOUNT_LOOKUP_CACHE_NONE)
+			seq_printf(m, ",lookupcache=none");
+		else
+			seq_printf(m, ",lookupcache=pos");
+	}
 }
 
 /*
--

Previous thread: Re: [2.6.35] AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40 BUG: unable to handle kernel NULL pointer dereference at 0000000000000198 by Sander Eikelenboom on Tuesday, August 10, 2010 - 9:57 am. (13 messages)

Next thread: Linux 2.6.27.50 by Greg KH on Tuesday, August 10, 2010 - 11:46 am. (2 messages)