Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] cifs: Allow nfsd over cifs
Date: Mon, 28 Feb 2011 18:42:26 -0500	[thread overview]
Message-ID: <20110228234225.GC14237@fieldses.org> (raw)
In-Reply-To: <AANLkTimDd-m388VJTC1zJtf3Q7LkFcsvNuwcY6vRwt7K-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, Feb 28, 2011 at 04:58:57PM -0600, Steve French wrote:
> On Mon, Feb 28, 2011 at 4:49 PM, J. Bruce Fields <bfields-uC3wQj2KruMpug/h7KTFAQ@public.gmane.orgg> wrote:
> > On Mon, Feb 28, 2011 at 03:52:41PM -0600, shirishpargaonkar@gmail.com wrote:
> >> +static struct dentry *
> >> +cifs_fh_to_dentry(struct super_block *sb, struct fid *fh,
> >> +                     int fh_len, int fh_type)
> >> +{
> >> +     struct cifs_fid *cfid = (struct cifs_fid *)fh;
> >> +     struct inode *inode = NULL;
> >> +     struct cifs_fattr fattr;
> >> +
> >>
> >> -#endif /* CIFS_NFSD_EXPORT */
> >> +     if (fh_type != FILEID_INO32_GEN && fh_type != FILEID_INO32_GEN_PARENT) {
> >> +             cERROR(1, "%s: Can't handle fh type: %d", __func__, fh_type);
> >> +             return ERR_PTR(-EINVAL);
> >> +     }
> >>
> >> +     if (!cfid->cino)
> >> +             return ERR_PTR(-ESTALE);
> >> +
> >> +     fattr.cf_uniqueid = cfid->cino;
> >> +     inode = iget5_locked(sb, cfid->cino, cifs_find_inode_id,
> >> +                                     cifs_init_inode, &fattr);
> >> +     if (IS_ERR(inode))
> >> +             return ERR_CAST(inode);
> >> +
> >> +     return d_obtain_alias(inode);
> >
> > Does the cifs protocol give the client a way to look up a file by inode
> > number (or filehandle or equivalent?).
> 
> There is a unique identifier similar to inode number returned by
> various info calls,
> but cifs calls use either a file handle (returned by an open) or path name to
> look up metadata on a file.
> 
> Not sure whether the unique identifier can be passed in as input to an
> ioctl useful here.

OK.  Then as things stand we're stuck returning ESTALE to the client
unless we happen to have the inode they're looking for in our cache?

--b.

  parent reply	other threads:[~2011-02-28 23:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 21:52 [PATCH] cifs: Allow nfsd over cifs shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w
     [not found] ` <1298929961-5541-1-git-send-email-shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-02-28 22:49   ` J. Bruce Fields
     [not found]     ` <20110228224957.GB14237-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2011-02-28 22:58       ` Steve French
     [not found]         ` <AANLkTimDd-m388VJTC1zJtf3Q7LkFcsvNuwcY6vRwt7K-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-28 23:42           ` J. Bruce Fields [this message]
     [not found]             ` <20110228234225.GC14237-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2011-02-28 23:52               ` Steve French
     [not found]                 ` <AANLkTikeSEYOs_nzno40eM0ZSrStMqcziPzWGRViT5M--JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-28 23:59                   ` J. Bruce Fields
     [not found]                     ` <20110228235910.GD14237-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2011-03-01  2:33                       ` Steve French
     [not found]                         ` <AANLkTinFwcBMmPpn0_30Bjaa+0ipoJ6qrM=u1TGQ+Q8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-01  3:28                           ` J. Bruce Fields
     [not found]                             ` <20110301032808.GA17725-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2011-03-01 18:07                               ` J. Bruce Fields
     [not found]                                 ` <20110301180700.GC20599-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2011-03-01 18:30                                   ` Shirish Pargaonkar
     [not found]                                     ` <AANLkTikNH0ujA-qram1=1JEqJ7DH6dLRR723YZgJde1+-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-01 19:21                                       ` J. Bruce Fields
     [not found]                                         ` <20110301192102.GD20599-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2011-03-01 20:09                                           ` Jeff Layton
     [not found]                                             ` <20110301150949.6ca5b880-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-03-01 20:11                                               ` Steve French
     [not found]                                                 ` <AANLkTikc2GAe1+jRyuJGEJ8i5EBtoO-dayocL2yATMWQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-01 20:31                                                   ` Jeff Layton
     [not found]                                                     ` <20110301153111.6673e191-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-03-01 20:37                                                       ` Steve French
2011-03-01 20:34                                                   ` J. Bruce Fields
     [not found]                                                     ` <20110301203445.GE20599-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2011-03-01 20:38                                                       ` Steve French
     [not found]                                                         ` <AANLkTikaGd6EzNBWkYrJM3upP4fnBUx4p7c_29cLReLX-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-01 20:48                                                           ` J. Bruce Fields
     [not found]                                                             ` <20110301204807.GF20599-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2011-03-16 15:30                                                               ` Jeff Layton
     [not found]                                                                 ` <4D80DAA5.6030106@likewise.com>
     [not found]                                                                   ` <AANLkTik9hN2jVW6+=LnwY1xaCLqGBW6-BeG-=dmZgCnr@mail.gmail.com>
     [not found]                                                                     ` <AANLkTikA6akj7GDM_H7ndbMvPc6rnRtZ_i_zEHMrG31H@mail.gmail.com>
     [not found]                                                                       ` <AANLkTinbOJRmrudrCyQ9zHTSUr69RV-1NTyoc1NOFAjz@mail.gmail.com>
     [not found]                                                                         ` <AANLkTincOKZ5YjN9cKYaTByu7DST7bzQvO5XESsStTDh@mail.gmail.com>
     [not found]                                                                           ` <AANLkTi=2EpL2F=+t0eDuGv_OrkxtgNxxu02_iv+ashbU@mail.gmail.com>
     [not found]                                                                             ` <AANLkTimLAg74dVMZqOrZ60CYe_94Q1ihwWGq7DaDTVyG@mail.gmail.com>
     [not found]                                                                               ` <AANLkTin+NAGqF5EJjVJZ1tW62tQcjmJLP8njfGLqsFZQ@mail.gmail.com>
     [not found]                                                                                 ` <AANLkTinUiU47-621kVwignvL0Dud1nTYc1RhnHMKQQz2@mail.gmail.com>
     [not found]                                                                                   ` <AANLkTi=St7RiwyEy0Fq-P16cfSTEvN0-BEgWC4NOsujx@mail.gmail.com>
     [not found]                                                                                     ` <AANLkTik5HcN=Lz70fGD1wN6GkZkQy4BWa7Ovz4RNghA0@mail.gmail.com>
     [not found]                                                                                       ` <AANLkTimYByiDRRjwrcNM+HKK6t_hgoS_oWn3hXVbzkF+@mail.gmail.com>
     [not found]                                                                                         ` <AANLkTi=0aG4iOtJPxe2zZnx9hW2DUGGArnR6s_jioZ=E@mail.gmail.com>
     [not found]                                                                                           ` <AANLkTimsD73JRzhFTycYKZBcgL9q3VjA1Dpj8judwWFE@mail.gmail.com>
     [not found]                                                                                             ` <AANLkTikcSyXoqbBKG+0iyX1zN=TfYQ5dTH9BTSoLg-42@mail.gmail.com>
     [not found]                                                                                               ` <AANLkTikcSyXoqbBKG+0iyX1zN=TfYQ5dTH9BTSoLg-42-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-23 17:57                                                                                                 ` Steve French
2011-03-01  5:17   ` Shirish Pargaonkar

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=20110228234225.GC14237@fieldses.org \
    --to=bfields-uc3wqj2krung9huczpvpmw@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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