From: Petr Vorel <pvorel@suse.cz>
To: Steve Dickson <SteveD@redhat.com>
Cc: NeilBrown <neilb@suse.de>,
"J . Bruce Fields" <bfields@fieldses.org>,
linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>,
Alexey Kodanev <alexey.kodanev@oracle.com>
Subject: Re: [PATCH/RFC v2 nfs-utils] Fix NFSv4 export of tmpfs filesystems.
Date: Thu, 20 May 2021 22:39:05 +0200 [thread overview]
Message-ID: <YKbI6Sj1QuMq3U4H@pevik> (raw)
In-Reply-To: <289c5819-917a-39a7-9aa4-2a27ae7248c0@RedHat.com>
Hi Steve, all,
> Hey!
> On 5/17/21 12:45 AM, NeilBrown wrote:
> > Some filesystems cannot be exported without an fsid or uuid.
> > tmpfs is the main example.
> > When mountd (or exportd) creates nfsv4 pseudo-root exports for the path
> > leading down to an export point it exports each directory without any
> > fsid or uuid. If one of these directories is on tmp, that will fail.
> > The net result is that exporting a subdirectory of a tmpfs filesystem
> > will not work over NFSv4 as the parents within the filesystem cannot be
> > exported. It will either fail, or fall-back to NFSv3 (depending on the
> > version of the mount.nfs program).
> > To fix this we need to provide an fsid or uuid for these pseudo-root
> > exports. This patch does that by creating an RFC-4122 V5 compatible
> > UUID based on an arbitrary seed and the path to the export.
> > To check if an export needs a uuid, text_export() is moved from exportfs
> > to libexport.a, modified slightly and renamed to export_test().
> Well.... it appears you guys did not compile with the --with-systemd
> config flag... Because if you did you would have seeing this compile error
> the in systemd code:
You're right, I didn't :(.
> /usr/bin/ld: ../support/nfs/.libs/libnfs.a(cacheio.o): in function `stat':
> /usr/include/sys/stat.h:455: undefined reference to `etab'
> collect2: error: ld returned 1 exit status
> make[1]: *** [Makefile:560: nfs-server-generator] Error 1
> make[1]: Leaving directory '/home/src/up/nfs-utils/systemd'
> make: *** [Makefile:479: all-recursive] Error 1
> It turns out the moving of export_test() in to the libexport.a
> is causing any binary linking with libexport.a to have a
> global definition of struct state_paths etab;
> The reason is export_test() calls qword_add(). Now qword_add()
> does not use an etab, but the file qword_add() lives in is
> cacheio.c which does have a extern struct state_paths etab
> which is the reason libnfs.a(cacheio.o) is mentioned in
> the error. At least that is what I *think* is going on...
> The extern came from commit a15bd94.
> Now the work around is to simply define a
> struct state_paths etab; in nfs-server-generator.c
> which will not be used at least by the systemd code.
> Now is that something we want continue doing... make any
> binaries linking with libexport.a define a global etab.
> It seems a little messy but the interface is not documented
> and the alternative, moving a bunch of code around see a lot
> more messy that simple adding one definition.
+1
Kind regards,
Petr
> Other than not compiling... Things looks good! ;-)
> Thoughts?
> steved.
...
next prev parent reply other threads:[~2021-05-20 20:39 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 19:18 [RFC PATCH 1/1] mount.nfs: Fix mounting on tmpfs Petr Vorel
2021-04-22 20:23 ` J . Bruce Fields
2021-04-23 2:17 ` Petr Vorel
2021-04-23 14:23 ` J . Bruce Fields
2021-04-23 17:04 ` Petr Vorel
2021-04-23 18:13 ` J . Bruce Fields
2021-04-23 20:37 ` Petr Vorel
2021-05-03 2:21 ` NeilBrown
2021-05-03 8:10 ` Petr Vorel
2021-05-03 14:15 ` J . Bruce Fields
2021-04-23 13:50 ` Petr Vorel
2021-05-07 1:48 ` [PATCH/RFC nfs-utils] Fix NFSv4 export of tmpfs filesystems NeilBrown
2021-05-07 10:06 ` Petr Vorel
2021-05-13 4:07 ` NeilBrown
2021-05-13 18:38 ` Petr Vorel
2021-05-13 18:51 ` Petr Vorel
2021-05-17 3:08 ` NeilBrown
2021-05-17 14:27 ` Petr Vorel
2021-05-07 13:55 ` Chuck Lever III
2021-05-07 23:13 ` NeilBrown
2021-05-17 4:45 ` [PATCH/RFC v2 " NeilBrown
2021-05-17 15:00 ` Petr Vorel
2021-05-18 17:54 ` Petr Vorel
2021-05-20 17:37 ` Steve Dickson
2021-05-20 20:39 ` Petr Vorel [this message]
2021-05-21 1:38 ` NeilBrown
2021-05-21 1:40 ` [PATCH nfs-utils 1/2] Remove 'force' arg from cache_flush() NeilBrown
2021-05-21 1:41 ` [PATCH nfs-utils 2/2] Move declaration of etab and rmtab into libraries NeilBrown
2021-05-21 13:57 ` Petr Vorel
2021-05-23 18:31 ` Steve Dickson
2021-05-21 13:52 ` [PATCH nfs-utils 1/2] Remove 'force' arg from cache_flush() Petr Vorel
2021-05-23 18:30 ` Steve Dickson
2021-05-23 18:29 ` [PATCH/RFC v2 nfs-utils] Fix NFSv4 export of tmpfs filesystems Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YKbI6Sj1QuMq3U4H@pevik \
--to=pvorel@suse.cz \
--cc=SteveD@redhat.com \
--cc=alexey.kodanev@oracle.com \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox