From owner-freebsd-fs@FreeBSD.ORG Fri Jan 28 23:08:26 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61290106567A for ; Fri, 28 Jan 2011 23:08:26 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 2114A8FC25 for ; Fri, 28 Jan 2011 23:08:25 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAFvbQk2DaFvO/2dsb2JhbACEFKFiqzKQZ4Ejgzh0BIUYhw8 X-IronPort-AV: E=Sophos;i="4.60,394,1291611600"; d="scan'208";a="107598668" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 28 Jan 2011 18:08:25 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 2AEEBB3F27; Fri, 28 Jan 2011 18:08:25 -0500 (EST) Date: Fri, 28 Jan 2011 18:08:25 -0500 (EST) From: Rick Macklem To: Marco van Tol Message-ID: <496514462.1056535.1296256105160.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20110125132258.GB94845@tolstoy.tols.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE8 (Win)/6.0.10_GA_2692) Cc: FreeBSD FS Subject: Re: runtime nfs mount options for existing mounts X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2011 23:08:26 -0000 > > How would I find out about the current mount options for an existing > NFS > mount on an NFS client? > > For example, if I mount an NFS file system using: > mount -t nfs -o rw,rsize=32768,wsize=32768,readahead=2 rhost:path node > > Suppose time goes by and I forgot what I used to mount the filesystem, > how can I find out what the rsize, wsize and readahead are for the > existing mount? > > (On another OS the settings are printed when just typing mount without > any other options, which I find usefull in some circumstances) > I don't think you can get this stuff out of the FreeBSD kernel right now. (I was hoping someone else was going to answer, but no one did:-) As to whether or not it should, I think it would be a nice feature, but I've got a lot of other stuff on my plate right now. I think it would take some sort of extension to the nmount(2) syscall or maybe a new syscall + noew VFS_xxx() op. I can say that, if someone else came up with the syscall/VFS changes, I could easily implement a function in the NFS client that generates the name/value pairs like nmount() uses. (There is currently a function that basically does that for the old mount() and I think a slightly modified version of that would do it. However, I haven't actually tried it.:-) Anyone feel like an nmount() related project to do this? rick