Patchwork [BUG:2553] nfs: more fixes to capture sattr for further usage

login
register
Submitter Anand Avati
Date 2011-03-30 06:48:46
Message ID <20110330064846.GA8064@dev.gluster.com>
Download mbox | patch
Permalink /patch/6639/
State Accepted
Headers show

Comments

Shehjar Tikoo - 2011-03-30 06:48:40
Reviewed OK. Thanks.

----- Original Message -----
> From: "Anand Avati" <avati@gluster.com>
> To: glusterfs@dev.gluster.com
> Cc: shehjart@gluster.com
> Sent: Wednesday, March 30, 2011 12:18:46 PM
> Subject: [PATCH BUG:2553] nfs: more fixes to capture sattr for further usage
> in
> 
> - mkdir
> - mknod
> 
> Signed-off-by: Anand Avati <avati@gluster.com>
> ---
> xlators/nfs/server/src/nfs3.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/xlators/nfs/server/src/nfs3.c
> b/xlators/nfs/server/src/nfs3.c
> index f60a1e6..6bf4fff 100644
> --- a/xlators/nfs/server/src/nfs3.c
> +++ b/xlators/nfs/server/src/nfs3.c
> @@ -2720,7 +2720,7 @@ nfs3_mkdir (rpcsvc_request_t *req, struct
> nfs3_fh *dirfh, char *name,
> nfs3_handle_call_state_init (nfs3, cs, req, vol, stat, nfs3err);
> 
> cs->parent = *dirfh;
> - cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, NULL,
> + cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, &cs->stbuf,
> &cs->mode);
> ret = nfs3_fh_resolve_and_resume (cs, dirfh, name, nfs3_mkdir_resume);
> if (ret < 0)
> @@ -3149,13 +3149,13 @@ nfs3_mknod (rpcsvc_request_t *req, struct
> nfs3_fh *fh, char *name,
> case NF3BLK:
> cs->devnums = nodedata->mknoddata3_u.device.spec;
> sattr = &nodedata->mknoddata3_u.device.dev_attributes;
> - cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, NULL,
> + cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, &cs->stbuf,
> &cs->mode);
> break;
> case NF3SOCK:
> case NF3FIFO:
> sattr = &nodedata->mknoddata3_u.pipe_attributes;
> - cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, NULL,
> + cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, &cs->stbuf,
> &cs->mode);
> break;
> default:
> --
> 1.7.1
> 
> 
> --
> ultimate_answer_t
> deep_thought (void)
> {
> sleep (years2secs (7500000));
> return 42;
> }
Anand Avati - 2011-03-30 06:48:46
in

- mkdir
- mknod

Signed-off-by: Anand Avati <avati@gluster.com>
---
 xlators/nfs/server/src/nfs3.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index f60a1e6..6bf4fff 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -2720,7 +2720,7 @@  nfs3_mkdir (rpcsvc_request_t *req, struct nfs3_fh *dirfh, char *name,
         nfs3_handle_call_state_init (nfs3, cs, req, vol, stat, nfs3err);
 
         cs->parent = *dirfh;
-        cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, NULL,
+        cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, &cs->stbuf,
                                                           &cs->mode);
         ret = nfs3_fh_resolve_and_resume (cs, dirfh, name, nfs3_mkdir_resume);
         if (ret < 0)
@@ -3149,13 +3149,13 @@  nfs3_mknod (rpcsvc_request_t *req, struct nfs3_fh *fh, char *name,
         case NF3BLK:
                 cs->devnums = nodedata->mknoddata3_u.device.spec;
                 sattr = &nodedata->mknoddata3_u.device.dev_attributes;
-                cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, NULL,
+                cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, &cs->stbuf,
                                                                   &cs->mode);
                 break;
         case NF3SOCK:
         case NF3FIFO:
                 sattr = &nodedata->mknoddata3_u.pipe_attributes;
-                cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, NULL,
+                cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, &cs->stbuf,
                                                                   &cs->mode);
                 break;
         default: