linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Filz <ffilzlnx@us.ibm.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: ffilz@us.ibm.com, NFS List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] NFS client has troubles with fileid with bit 31 (or bit 63) set
Date: Thu, 02 Dec 2010 09:44:50 -0800	[thread overview]
Message-ID: <1291311890.5075.23.camel@KPMH461.ibm.com> (raw)
In-Reply-To: <1291259596.6609.109.camel@heimdal.trondhjem.org>


On Wed, 2010-12-01 at 22:13 -0500, Trond Myklebust wrote:
> I'm suggesting it should rather match the compat_ulong_t, since that is
> what 64-bit kernels will need to deal with if running a 32-bit
> userspace. For 64-bit kernels that have no 32-bit userspace emulation
> layer, why would we care about returning a truncated 32-bit fileid?
> 
> Conversely, if running a 32-bit kernel, then 'unsigned long' will
> directly match the types used by fs/readdir.c:filldir()

Ah, got it now... Sorry for denseness...

Hmm, what would be ideal is for nfs_compat_user_ino64() to know if it's
value will be passed to compat_filldir or filldir. If we use
compat_ulong_t when CONFIG_COMPAT is defined, and enable_ino64 = 0, it
will always reduce the fileid to 32 bits, even if being passed to
filldir on a 64 bit machine which is prepared to take a 64 bit fileid.
On the other hand, if enable_ino64 = 1, then fileids >= 2^32 will cause
an error if a 32 bit user space application is being invoked.

With enable_ino64 = 1 on a machine otherwise enabled for 64 bit inode
numbers, it will definitely work like any local file system with 64 bit
inode numebers.

With enable_ino64 = 0, it will always force fileid into 32 bits if there
is any 32 bit user space, which I suppose is good behavior.

I will submit a revised patch.

Thanks

Frank


      reply	other threads:[~2010-12-02 18:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02  1:03 [PATCH] NFS client has troubles with fileid with bit 31 (or bit 63) set Frank Filz
2010-12-02  1:36 ` Trond Myklebust
2010-12-02  3:01   ` Frank Filz
2010-12-02  3:13     ` Trond Myklebust
2010-12-02 17:44       ` Frank Filz [this message]

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=1291311890.5075.23.camel@KPMH461.ibm.com \
    --to=ffilzlnx@us.ibm.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=ffilz@us.ibm.com \
    --cc=linux-nfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).