~ubuntu-branches/ubuntu/raring/ceph/raring

« back to all changes in this revision

Viewing changes to src/mds/Server.cc

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2012-02-05 10:07:38 UTC
  • mfrom: (1.1.7) (0.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20120205100738-00s0bxx93mamy8tk
Tags: 0.41-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
#include "include/filepath.h"
50
50
#include "common/Timer.h"
51
51
#include "common/perf_counters.h"
 
52
#include "include/compat.h"
52
53
 
53
54
#include <errno.h>
54
55
#include <fcntl.h>
55
 
#include <sys/xattr.h>
56
56
 
57
57
#include <list>
58
58
#include <iostream>
289
289
      // reset session
290
290
      mds->send_message_client(new MClientSession(CEPH_SESSION_CLOSE), session);
291
291
      mds->sessionmap.set_state(session, Session::STATE_CLOSED);
 
292
      mds->messenger->mark_disposable(session->connection);
292
293
      session->clear();
293
294
    } else if (session->is_killing()) {
294
295
      // destroy session, close connection
822
823
 
823
824
  mds->logger->inc(l_mds_reply);
824
825
  double lat = ceph_clock_now(g_ceph_context) - mdr->client_request->get_recv_stamp();
825
 
  mds->logger->fset(l_mds_replyl, lat);
 
826
  mds->logger->finc(l_mds_replyl, lat);
826
827
  dout(20) << "lat " << lat << dendl;
827
828
}
828
829
 
864
865
 
865
866
    mds->logger->inc(l_mds_reply);
866
867
    double lat = ceph_clock_now(g_ceph_context) - mdr->client_request->get_recv_stamp();
867
 
    mds->logger->fset(l_mds_replyl, lat);
 
868
    mds->logger->finc(l_mds_replyl, lat);
868
869
    dout(20) << "lat " << lat << dendl;
869
870
    
870
871
    if (tracei)
2040
2041
/**
2041
2042
 * try_open_auth_dirfrag -- open dirfrag, or forward to dirfrag auth
2042
2043
 *
2043
 
 * @diri base indoe
2044
 
 * @fg the exact frag we want
2045
 
 * @mdr request
2046
 
 * Returns: the pointer, or NULL if it had to be delayed (but mdr is taken care of)
 
2044
 * @param diri base inode
 
2045
 * @param fg the exact frag we want
 
2046
 * @param mdr request
 
2047
 * @returns the pointer, or NULL if it had to be delayed (but mdr is taken care of)
2047
2048
 */
2048
2049
CDir* Server::try_open_auth_dirfrag(CInode *diri, frag_t fg, MDRequest *mdr)
2049
2050
{
3384
3385
  string name(req->get_path2());
3385
3386
  int flags = req->head.args.setxattr.flags;
3386
3387
 
3387
 
  if ((flags & XATTR_CREATE) && cur->xattrs.count(name)) {
 
3388
  if ((flags & CEPH_XATTR_CREATE) && cur->xattrs.count(name)) {
3388
3389
    dout(10) << "setxattr '" << name << "' XATTR_CREATE and EEXIST on " << *cur << dendl;
3389
3390
    reply_request(mdr, -EEXIST);
3390
3391
    return;
3391
3392
  }
3392
 
  if ((flags & XATTR_REPLACE) && !cur->xattrs.count(name)) {
 
3393
  if ((flags & CEPH_XATTR_REPLACE) && !cur->xattrs.count(name)) {
3393
3394
    dout(10) << "setxattr '" << name << "' XATTR_REPLACE and ENODATA on " << *cur << dendl;
3394
3395
    reply_request(mdr, -ENODATA);
3395
3396
    return;