~ubuntu-branches/ubuntu/wily/glusterfs/wily

« back to all changes in this revision

Viewing changes to xlators/nfs/server/src/nfs3.c

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2011-06-26 21:00:42 UTC
  • mfrom: (1.3.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20110626210042-ps1aim0cwz06tkx1
Tags: 3.2.1-1
* New upstream release.
  - Refresh patch 02-spelling-error.
* Wrap dependencies.
* Merge libglusterfs0 and libglusterfs-dev package to glusterfs-common.
  Closes: #630147
* Use python-module.mk and remove useless python bytecode files.
  Closes: #630146

Show diffs side-by-side

added added

removed removed

Lines of Context:
2437
2437
 
2438
2438
        /* Storing verifier as a mtime and atime attribute, to store it
2439
2439
         * in stable storage */
2440
 
        cs->stbuf.ia_atime = (cs->cookieverf & 0xFFFFFFFF00000000);
2441
 
        cs->stbuf.ia_mtime = (cs->cookieverf & 0x00000000FFFFFFFF);
 
2440
        memcpy (&cs->stbuf.ia_atime, &cs->cookieverf, sizeof (cs->stbuf.ia_atime));
 
2441
        memcpy (&cs->stbuf.ia_mtime,
 
2442
                ((char *) &cs->cookieverf) + sizeof (cs->stbuf.ia_atime),
 
2443
                sizeof (cs->stbuf.ia_mtime));
2442
2444
        cs->setattr_valid |= GF_SET_ATTR_ATIME;
2443
2445
        cs->setattr_valid |= GF_SET_ATTR_MTIME;
2444
2446
        nfs_request_user_init (&nfu, cs->req);
2459
2461
                ret = nfs_create (cs->nfsx, cs->vol, &nfu, &cs->resolvedloc,
2460
2462
                                  O_RDWR, cs->mode, nfs3svc_create_cbk, cs);
2461
2463
        } else
2462
 
                ret = nfs_create (cs->nfsx, cs->vol, &nfu, &cs->oploc, O_RDWR,
 
2464
                ret = nfs_create (cs->nfsx, cs->vol, &nfu, &cs->resolvedloc, O_RDWR,
2463
2465
                                  NFS_DEFAULT_CREATE_MODE, nfs3svc_create_cbk,
2464
2466
                                  cs);
2465
2467
 
2523
2525
        nfs3_handle_call_state_init (nfs3, cs, req, vol, stat, nfs3err);
2524
2526
 
2525
2527
        cs->cookieverf = cverf;
2526
 
        cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, &cs->stbuf,
 
2528
        /*In Exclusive create client is supposed to send cverf instead of
 
2529
         * sattr*/
 
2530
        if (mode != EXCLUSIVE)
 
2531
                cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, &cs->stbuf,
2527
2532
                                                          &cs->mode);
2528
2533
        cs->createmode = mode;
2529
2534
        cs->parent = *dirfh;