Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Krishna Kumar2 <krkumar2@in.ibm.com>
Cc: jlayton@redhat.com, Krishna Kumar <krikku@gmail.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH 3/11] nfsd: CHANGE old function calls to new calls
Date: Thu, 23 Apr 2009 18:39:09 -0400	[thread overview]
Message-ID: <20090423223909.GF1906@fieldses.org> (raw)
In-Reply-To: <OFB63DF5D6.1A77785C-ON652575A1.004F6726-652575A1.00577C61@in.ibm.com>

On Thu, Apr 23, 2009 at 09:25:34PM +0530, Krishna Kumar2 wrote:
> Hi Bruce,
> 
> (combining all three of your mails into one response for easier tracking)
> 
> "J. Bruce Fields" <bfields@fieldses.org> wrote on 04/23/2009 01:35:53 AM:
> 
> > How do you know fh_auth[3] is sufficient to identify the file reliably?
> > This looks very fragile to me.
> >
> > If the goal is to bypass rqst_exp_find(), exportfs_decode_fh() and
> > friends--that makes me nervous.  We should figure out how to make those
> > lookups faster instead.  Or at the very least, make sure we're keying on
> > the entire filehandle instead of just part of it.
> 
> To understand how filehandles works, I was looking at nfsd_set_fh_dentry,
> here fid is fh->auth[2] (since type is FSID_DEV). However, the unique FH
> value is stored in fh->auth[3], while auth[0]/[1] contains the maj/min and
> ino. fh->auth[3] is unique for different files and across file systems, but
> it is not actually used to find the file (only the exp) - the stored
> dev/ino
> (auth[0] and auth[1]) are used to find the dentry by calling the underlying
> filesystem (exportfs_decode_fh).
> 
> Keying on the entire filehandle seems reasonable, but I don't think it is
> required as auth[3] seems to be allocated memory which is unique in a
> system,

You lost me.  Where do you see auth[3] getting encoded, and what do you
mean by saying it's "allocated memory which is unique in a system"?

There are a lot of different filehandle encoding options.  I lose track
of them myself....

> just that we don't use it for locating the file currently and I was
> proposing
> that we do. Please correct me if this is wrong, or whether a better way is
> possible.
> 
> > This patch doesn't change anything--it only adds new lines.  If you're
> > trying to make minimal changes, that's admirable, but break up the
> > patches in such a way that each patch shows that minimal change.
> 
> To make each revision compile cleanly, I had to add the infrastructure and
> then delete the old one. So it looks like new code. The entire function and
> data structures are re-written so it is difficult to break into individual
> components where each will compile clean.

Breaking up a complex change into logical individual steps, each of
which compile and run cleanly, is sometimes tricky.  So it may be that
there *is* some way to do it in this case, but that you just haven't
found it yet.

That said, it could be, as you say, that this requires just replacing
everything.  In that case, please just start over from scratch and don't
feel bound to keep stuff from the old implementation that you don't
understand.

--b.

> > By "noisy" I just mean that they look like there's a lot of randomness.
> > So, yes, I'm fine with a subset, but I'm curious what the variance is on
> > repeated runs of each test.
> 
> Sure, I will try to do this over the weekend and submit.
> 
> thanks,
> 
> - KK
> 

  reply	other threads:[~2009-04-23 22:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090325133607.16437.33288.sendpatchset@localhost.localdomain>
     [not found] ` <20090325133607.16437.33288.sendpatchset-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-17 18:46   ` [PATCH 0/11] nfsd: Summary of "Improve NFS server performance" J. Bruce Fields
2009-04-17 19:30     ` Krishna Kumar2
2009-04-21 22:57   ` J. Bruce Fields
2009-04-22  5:35     ` Krishna Kumar2
2009-04-22 19:41       ` J. Bruce Fields
     [not found] ` <20090325133628.16437.11092.sendpatchset@localhost.localdomain>
     [not found]   ` <20090325133628.16437.11092.sendpatchset-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-21 22:48     ` [PATCH 1/11] nfsd: ADD data structure infrastructure J. Bruce Fields
2009-04-22  5:36       ` Krishna Kumar2
2009-04-22 19:43         ` J. Bruce Fields
2009-04-21 23:05     ` J. Bruce Fields
     [not found] ` <20090325133647.16437.59567.sendpatchset@localhost.localdomain>
     [not found]   ` <20090325133647.16437.59567.sendpatchset-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-22  2:54     ` [PATCH 2/11] nfsd: ADD new function infrastructure J. Bruce Fields
2009-04-22  5:37       ` Krishna Kumar2
     [not found] ` <20090325133707.16437.66360.sendpatchset@localhost.localdomain>
     [not found]   ` <20090325133707.16437.66360.sendpatchset-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-22 20:05     ` [PATCH 3/11] nfsd: CHANGE old function calls to new calls J. Bruce Fields
2009-04-23 15:55       ` Krishna Kumar2
2009-04-23 22:39         ` J. Bruce Fields [this message]
2009-04-24 16:17           ` Krishna Kumar2
2009-04-24 16:23             ` J. Bruce Fields
2009-04-24 16:58               ` Krishna Kumar2
2009-04-24 19:25                 ` J. Bruce Fields
2009-04-26 11:16                   ` Krishna Kumar2

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=20090423223909.GF1906@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=jlayton@redhat.com \
    --cc=krikku@gmail.com \
    --cc=krkumar2@in.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