]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
types: standardize on uint64_t
authorSage Weil <sage@newdream.net>
Wed, 26 May 2010 23:53:13 +0000 (16:53 -0700)
committerSage Weil <sage@newdream.net>
Wed, 26 May 2010 23:53:13 +0000 (16:53 -0700)
The problem is that on some platforms __u64 == uint64_t (x86_64), and on
others it's doesn't (ppc64).  Which means we don't know whether to define
different versions of overloaded functions for both types or just one.

So, standardize on uint64_t.  This plays nicer with STL, which defines
hash<uint64_t> on 64 bit arches but not 32 bit.  Which means we can't
standarzie on __u64 or else hash<__u64> won't work.  Bah!

Conflicts:

src/common/Throttle.h
src/config.h
src/include/librados.h
src/include/librados.hpp
src/librados.cc
src/messages/MPoolOp.h
src/mon/OSDMonitor.cc
src/os/FileJournal.cc
src/osd/osd_types.h
src/osdc/Objecter.h

145 files changed:
src/auth/Auth.h
src/auth/AuthAuthorizeHandler.h
src/auth/AuthServiceHandler.h
src/auth/KeyRing.h
src/auth/cephx/CephxAuthorizeHandler.cc
src/auth/cephx/CephxAuthorizeHandler.h
src/auth/cephx/CephxProtocol.cc
src/auth/cephx/CephxProtocol.h
src/auth/cephx/CephxServiceHandler.cc
src/auth/cephx/CephxServiceHandler.h
src/auth/none/AuthNoneAuthorizeHandler.cc
src/auth/none/AuthNoneAuthorizeHandler.h
src/auth/none/AuthNoneServiceHandler.h
src/cauthtool.cc
src/client/Client.cc
src/client/Client.h
src/client/SyntheticClient.cc
src/client/fuse_ll.cc
src/client/ioctl.h
src/common/Logger.cc
src/common/Logger.h
src/common/Throttle.h
src/common/cas.cc
src/common/debug.cc
src/common/debug.h
src/config.h
src/dumpjournal.cc
src/ebofs/BlockDevice.cc
src/ebofs/BufferCache.cc
src/ebofs/BufferCache.h
src/ebofs/Ebofs.cc
src/ebofs/Ebofs.h
src/ebofs/Onode.h
src/ebofs/csum.h
src/ebofs/mkfs.ebofs.cc
src/ebofs/test.ebofs.cc
src/ebofs/types.h
src/include/CompatSet.h
src/include/LogEntry.h
src/include/byteorder.h
src/include/encoding.h
src/include/hash.h
src/include/interval_set.h
src/include/librados.h
src/include/librados.hpp
src/include/object.h
src/include/types.h
src/librados.cc
src/mds/AnchorServer.cc
src/mds/AnchorServer.h
src/mds/CDentry.cc
src/mds/CDentry.h
src/mds/CDir.cc
src/mds/CDir.h
src/mds/CInode.cc
src/mds/CInode.h
src/mds/Capability.h
src/mds/Locker.cc
src/mds/Locker.h
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/MDLog.h
src/mds/MDSMap.cc
src/mds/MDSMap.h
src/mds/MDSTableClient.cc
src/mds/MDSTableClient.h
src/mds/MDSTableServer.h
src/mds/Migrator.cc
src/mds/Migrator.h
src/mds/Server.cc
src/mds/Server.h
src/mds/SessionMap.cc
src/mds/SessionMap.h
src/mds/SimpleLock.h
src/mds/SnapServer.cc
src/mds/SnapServer.h
src/mds/events/EMetaBlob.h
src/mds/events/ETableServer.h
src/mds/journal.cc
src/mds/mdstypes.h
src/mds/snap.cc
src/messages/MAuthReply.h
src/messages/MClientCaps.h
src/messages/MClientLease.h
src/messages/MClientReconnect.h
src/messages/MClientReply.h
src/messages/MMDSBeacon.h
src/messages/MMDSLoadTargets.h
src/messages/MMDSTableRequest.h
src/messages/MOSDOp.h
src/messages/MOSDSubOp.h
src/messages/MPoolOp.h
src/messages/MRoute.h
src/messages/PaxosServiceMessage.h
src/mon/AuthMonitor.cc
src/mon/MDSMonitor.cc
src/mon/MDSMonitor.h
src/mon/MonCaps.cc
src/mon/MonCaps.h
src/mon/Monitor.cc
src/mon/Monitor.h
src/mon/OSDMonitor.cc
src/mon/OSDMonitor.h
src/mon/Session.h
src/msg/Message.h
src/msg/SimpleMessenger.cc
src/msg/SimpleMessenger.h
src/msg/msg_types.h
src/os/FileJournal.cc
src/os/FileJournal.h
src/os/FileStore.cc
src/os/FileStore.h
src/os/Journal.h
src/os/JournalingObjectStore.cc
src/os/JournalingObjectStore.h
src/os/ObjectStore.h
src/os/btrfs_ioctl.h
src/osd/OSD.cc
src/osd/OSDCaps.cc
src/osd/OSDCaps.h
src/osd/PG.cc
src/osd/PG.h
src/osd/PGLS.h
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h
src/osd/osd_types.h
src/osdc/Filer.cc
src/osdc/Filer.h
src/osdc/Journaler.cc
src/osdc/Journaler.h
src/osdc/ObjectCacher.cc
src/osdc/ObjectCacher.h
src/osdc/Objecter.cc
src/osdc/Objecter.h
src/psim.cc
src/rados.cc
src/rbdtool.cc
src/rgw/rgw_access.h
src/rgw/rgw_admin.cc
src/rgw/rgw_common.h
src/rgw/rgw_fs.cc
src/rgw/rgw_fs.h
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h
src/testmsgr.cc

index 638ed350a61726c39723e56fda5f917cce296046..0ff195875cf1a8645180871b75efe705023e5ad4 100644 (file)
@@ -105,7 +105,7 @@ static inline ostream& operator<<(ostream& out, const EntityName& n) {
 
 
 struct EntityAuth {
-  __u64 auid;
+  uint64_t auid;
   CryptoKey key;
   map<string, bufferlist> caps;
 
index 23c1ee7cf8130411d9e8cb9c6f2b148351c5f481..76a9cc210de0d7b44a6d49b85f4fbeb0294b1370 100644 (file)
@@ -27,7 +27,7 @@ struct AuthAuthorizeHandler {
   virtual bool verify_authorizer(KeyStore *keys,
                                 bufferlist& authorizer_data, bufferlist& authorizer_reply,
                                  EntityName& entity_name, uint64_t& global_id,
-                                AuthCapsInfo& caps_info, __u64 *auid = NULL) = 0;
+                                AuthCapsInfo& caps_info, uint64_t *auid = NULL) = 0;
 };
 
 extern AuthAuthorizeHandler *get_authorize_handler(int protocol);
index c894f8b39b438dfffeb38bfaaa59d46e37f3a6df..729f6404891a330a161836666029a6d75b9a62d5 100644 (file)
@@ -30,7 +30,7 @@ struct AuthServiceHandler {
   virtual ~AuthServiceHandler() { }
 
   virtual int start_session(EntityName& name, bufferlist::iterator& indata, bufferlist& result, AuthCapsInfo& caps) = 0;
-  virtual int handle_request(bufferlist::iterator& indata, bufferlist& result, uint64_t& global_id, AuthCapsInfo& caps, __u64 *auid = NULL) = 0;
+  virtual int handle_request(bufferlist::iterator& indata, bufferlist& result, uint64_t& global_id, AuthCapsInfo& caps, uint64_t *auid = NULL) = 0;
 
   EntityName& get_entity_name() { return entity_name; }
 };
index 1d39882c0fb550d9a0550defd6c82e04e7e5d733..9d35e6625839ad0137f9b5e018b3d7e8931b3acc 100644 (file)
@@ -55,7 +55,7 @@ public:
   void set_caps(EntityName& name, map<string, bufferlist>& caps) {
     keys[name].caps = caps;
   }
-  void set_uid(EntityName& ename, __u64 auid) {
+  void set_uid(EntityName& ename, uint64_t auid) {
     keys[ename].auid = auid;
   }
   void import(KeyRing& other);
index 5e612d12642027e1e0963ebcf113287544e17fea..55272ecc6526853f5e81981261339a40bddee7f1 100644 (file)
@@ -7,7 +7,7 @@
 
 bool CephxAuthorizeHandler::verify_authorizer(KeyStore *keys,
                                              bufferlist& authorizer_data, bufferlist& authorizer_reply,
-                                              EntityName& entity_name, uint64_t& global_id, AuthCapsInfo& caps_info, __u64 *auid)
+                                              EntityName& entity_name, uint64_t& global_id, AuthCapsInfo& caps_info, uint64_t *auid)
 {
   bufferlist::iterator iter = authorizer_data.begin();
 
index f83e939b3f7216773e0dbbb8490accb66af0e28a..10b942f8678d183aaaeaa1b4bfbbd9421479c567 100644 (file)
@@ -21,7 +21,7 @@ struct CephxAuthorizeHandler : public AuthAuthorizeHandler {
   bool verify_authorizer(KeyStore *keys,
                         bufferlist& authorizer_data, bufferlist& authorizer_reply,
                          EntityName& entity_name, uint64_t& global_id,
-                        AuthCapsInfo& caps_info, __u64 *auid = NULL);
+                        AuthCapsInfo& caps_info, uint64_t *auid = NULL);
 };
 
 
index 8c7ef2edbc9f21930f698df35d19f1466c479175..70bcffbd3ccae8c8a4762585239dc88990c90fa7 100644 (file)
@@ -10,7 +10,7 @@
 
 
 
-int cephx_calc_client_server_challenge(CryptoKey& secret, __u64 server_challenge, __u64 client_challenge, __u64 *key)
+int cephx_calc_client_server_challenge(CryptoKey& secret, uint64_t server_challenge, uint64_t client_challenge, uint64_t *key)
 {
   CephXChallengeBlob b;
   b.server_challenge = server_challenge;
@@ -21,7 +21,7 @@ int cephx_calc_client_server_challenge(CryptoKey& secret, __u64 server_challenge
   if (ret < 0)
     return ret;
 
-  __u64 k = 0;
+  uint64_t k = 0;
   const uint64_t *p = (const uint64_t *)enc.c_str();
   for (int pos = 0; pos + sizeof(k) <= enc.length(); pos+=sizeof(k), p++)
     k ^= *p;
@@ -264,7 +264,7 @@ CephXAuthorizer *CephXTicketHandler::build_authorizer(uint64_t global_id)
 {
   CephXAuthorizer *a = new CephXAuthorizer;
   a->session_key = session_key;
-  a->nonce = ((__u64)rand() << 32) + rand();
+  a->nonce = ((uint64_t)rand() << 32) + rand();
 
   __u8 authorizer_v = 1;
   ::encode(authorizer_v, a->bl);
@@ -434,7 +434,7 @@ bool CephXAuthorizer::verify_reply(bufferlist::iterator& indata)
     return false;
   }
 
-  __u64 expect = nonce + 1;
+  uint64_t expect = nonce + 1;
   if (expect != reply.nonce_plus_one) {
     dout(0) << "verify_authorizer_reply bad nonce got " << reply.nonce_plus_one << " expected " << expect
            << " sent " << nonce << dendl;
index e1ca323436f95cd8896a76203e51eb483039c0fc..52cc4402be88612496d2dab6cba9fdb6b08fa8e6 100644 (file)
@@ -91,7 +91,7 @@
 
 // initial server -> client challenge
 struct CephXServerChallenge {
-  __u64 server_challenge;
+  uint64_t server_challenge;
 
   void encode(bufferlist& bl) const {
     __u8 struct_v = 1;
@@ -160,8 +160,8 @@ WRITE_CLASS_ENCODER(CephXTicketBlob);
 
 // client -> server response to challenge
 struct CephXAuthenticate {
-  __u64 client_challenge;
-  __u64 key;
+  uint64_t client_challenge;
+  uint64_t key;
   CephXTicketBlob old_ticket;
 
   void encode(bufferlist& bl) const {
@@ -182,7 +182,7 @@ struct CephXAuthenticate {
 WRITE_CLASS_ENCODER(CephXAuthenticate)
 
 struct CephXChallengeBlob {
-  __u64 server_challenge, client_challenge;
+  uint64_t server_challenge, client_challenge;
   
   void encode(bufferlist& bl) const {
     ::encode(server_challenge, bl);
@@ -195,8 +195,8 @@ struct CephXChallengeBlob {
 };
 WRITE_CLASS_ENCODER(CephXChallengeBlob)
 
-int cephx_calc_client_server_challenge(CryptoKey& secret, __u64 server_challenge, __u64 client_challenge,
-                                      __u64 *key);
+int cephx_calc_client_server_challenge(CryptoKey& secret, uint64_t server_challenge, uint64_t client_challenge,
+                                      uint64_t *key);
 
 
 /*
@@ -245,7 +245,7 @@ WRITE_CLASS_ENCODER(CephXServiceTicketRequest);
  */
 
 struct CephXAuthorizeReply {
-  __u64 nonce_plus_one;
+  uint64_t nonce_plus_one;
   void encode(bufferlist& bl) const {
     __u8 struct_v = 1;
     ::encode(struct_v, bl);
@@ -261,7 +261,7 @@ WRITE_CLASS_ENCODER(CephXAuthorizeReply);
 
 
 struct CephXAuthorizer : public AuthAuthorizer {
-  __u64 nonce;
+  uint64_t nonce;
   CryptoKey session_key;
 
   CephXAuthorizer() : AuthAuthorizer(CEPH_AUTH_CEPHX) {}
@@ -362,7 +362,7 @@ struct CephXServiceTicketInfo {
 WRITE_CLASS_ENCODER(CephXServiceTicketInfo);
 
 struct CephXAuthorize {
-  __u64 nonce;
+  uint64_t nonce;
   void encode(bufferlist& bl) const {
     __u8 struct_v = 1;
     ::encode(struct_v, bl);
index d9ac488e893d1b543be4709d3d03b357c4f6f4f9..ee039d5534ecee77d7435f114416ba24ddd9b08e 100644 (file)
@@ -44,7 +44,7 @@ int CephxServiceHandler::start_session(EntityName& name, bufferlist::iterator& i
   return CEPH_AUTH_CEPHX;
 }
 
-int CephxServiceHandler::handle_request(bufferlist::iterator& indata, bufferlist& result_bl, uint64_t& global_id, AuthCapsInfo& caps, __u64 *auid)
+int CephxServiceHandler::handle_request(bufferlist::iterator& indata, bufferlist& result_bl, uint64_t& global_id, AuthCapsInfo& caps, uint64_t *auid)
 {
   int ret = 0;
 
@@ -72,7 +72,7 @@ int CephxServiceHandler::handle_request(bufferlist::iterator& indata, bufferlist
        break;
       }      
 
-      __u64 expected_key;
+      uint64_t expected_key;
       cephx_calc_client_server_challenge(secret, server_challenge, req.client_challenge, &expected_key);
 
       dout(20) << " checking key: req.key=" << hex << req.key
index 48e3ba4371521596be45b774c14f9ba1ea6642ad..a8a39f09be0bc942e105d1707a57c2d00600a77f 100644 (file)
@@ -29,7 +29,7 @@ public:
   ~CephxServiceHandler() {}
   
   int start_session(EntityName& name, bufferlist::iterator& indata, bufferlist& result_bl, AuthCapsInfo& caps);
-  int handle_request(bufferlist::iterator& indata, bufferlist& result_bl, uint64_t& global_id, AuthCapsInfo& caps, __u64 *auid = NULL);
+  int handle_request(bufferlist::iterator& indata, bufferlist& result_bl, uint64_t& global_id, AuthCapsInfo& caps, uint64_t *auid = NULL);
   void build_cephx_response_header(int request_type, int status, bufferlist& bl);
 };
 
index 5d6d9fc2ff33faddb6ec5c8633cd62aac1a3e9de..fbc655b5cd0ad64efad47c39f65bab09caa71cd6 100644 (file)
@@ -6,7 +6,7 @@
 bool AuthNoneAuthorizeHandler::verify_authorizer(KeyStore *keys,
                                                 bufferlist& authorizer_data, bufferlist& authorizer_reply,
                                                 EntityName& entity_name, uint64_t& global_id, AuthCapsInfo& caps_info,
-__u64 *auid)
+uint64_t *auid)
 {
   bufferlist::iterator iter = authorizer_data.begin();
 
index 0686292b433b704f779a9d526e546c6fea8ff0c2..f5db034d9aedc5026ddb3d6006ed5925df1a73b2 100644 (file)
@@ -21,7 +21,7 @@ struct AuthNoneAuthorizeHandler : public AuthAuthorizeHandler {
   bool verify_authorizer(KeyStore *keys,
                         bufferlist& authorizer_data, bufferlist& authorizer_reply,
                          EntityName& entity_name, uint64_t& global_id,
-                        AuthCapsInfo& caps_info, __u64 *auid=NULL);
+                        AuthCapsInfo& caps_info, uint64_t *auid=NULL);
 };
 
 
index 1ff304d5a9096bedcc83ede9f8576f4d3b840cbe..271fc3651887446727d5cb6c970e9ceaee1560d7 100644 (file)
@@ -28,7 +28,7 @@ public:
     caps.allow_all = true;
     return CEPH_AUTH_NONE;
   }
-  int handle_request(bufferlist::iterator& indata, bufferlist& result_bl, uint64_t& global_id, AuthCapsInfo& caps, __u64 *auid = NULL) {
+  int handle_request(bufferlist::iterator& indata, bufferlist& result_bl, uint64_t& global_id, AuthCapsInfo& caps, uint64_t *auid = NULL) {
     assert(0);  // shouldn't get called
     return 0;
   }
index 194a070b7b147d6b59d02b9a06f3be8c21929054..822e7283daa306456a8115432280f0f055d40cad 100644 (file)
@@ -48,7 +48,7 @@ int main(int argc, const char **argv)
   const char *caps_fn = NULL;
   const char *import_keyring = NULL;
   bool set_auid = false;
-  __u64 auid = CEPH_AUTH_UID_DEFAULT;
+  uint64_t auid = CEPH_AUTH_UID_DEFAULT;
   const char *name = g_conf.name;
 
   FOR_EACH_ARG(args) {
index f5f0568692ef504fece00e3944b18e91edcb619c..4c9602f1cfd65cfef4f2da4d7929aa5aa9bc214e 100644 (file)
@@ -335,9 +335,9 @@ void Client::trim_cache()
 
 
 void Client::update_inode_file_bits(Inode *in,
-                                   __u64 truncate_seq, __u64 truncate_size,
-                                   __u64 size,
-                                   __u64 time_warp_seq, utime_t ctime,
+                                   uint64_t truncate_seq, uint64_t truncate_size,
+                                   uint64_t size,
+                                   uint64_t time_warp_seq, utime_t ctime,
                                    utime_t mtime,
                                    utime_t atime,
                                    int issued)
@@ -1669,7 +1669,7 @@ void Client::cap_delay_requeue(Inode *in)
 }
 
 void Client::send_cap(Inode *in, int mds, InodeCap *cap, int used, int want, int retain, int flush,
-                     __u64 tid)
+                     uint64_t tid)
 {
   int held = cap->issued | cap->implemented;
   int revoking = cap->implemented & ~cap->issued;
@@ -1736,7 +1736,7 @@ void Client::check_caps(Inode *in, bool is_delayed)
   unsigned wanted = in->caps_wanted();
   unsigned used = in->caps_used();
   int flush = 0;
-  __u64 flush_tid = 0;
+  uint64_t flush_tid = 0;
 
   int retain = wanted | CEPH_CAP_PIN;
   if (!unmounting) {
@@ -2030,7 +2030,7 @@ void Client::check_cap_issue(Inode *in, InodeCap *cap, unsigned issued)
   }
 }
 
-void Client::add_update_cap(Inode *in, int mds, __u64 cap_id,
+void Client::add_update_cap(Inode *in, int mds, uint64_t cap_id,
                            unsigned issued, unsigned seq, unsigned mseq, inodeno_t realm,
                            int flags)
 {
@@ -2181,7 +2181,7 @@ void Client::flush_caps()
     check_caps(in, true);
   }
 }
-void Client::wait_sync_caps(__u64 want)
+void Client::wait_sync_caps(uint64_t want)
 {
  retry:
   dout(10) << "wait_sync_caps want " << want << " (last is " << last_flush_seq << ", "
@@ -2973,7 +2973,7 @@ void Client::renew_caps()
 void Client::renew_caps(const int mds) {
   dout(10) << "renew_caps mds" << mds << dendl;
   mds_sessions[mds].last_cap_renew_request = g_clock.now();
-  __u64 seq = ++mds_sessions[mds].cap_renew_seq;
+  uint64_t seq = ++mds_sessions[mds].cap_renew_seq;
   messenger->send_message(new MClientSession(CEPH_SESSION_REQUEST_RENEWCAPS, seq),
                          mdsmap->get_inst(mds));
 
@@ -4262,7 +4262,7 @@ int Client::read(int fd, char *buf, loff_t size, loff_t offset)
   return r;
 }
 
-int Client::_read(Fh *f, __s64 offset, __u64 size, bufferlist *bl)
+int Client::_read(Fh *f, int64_t offset, uint64_t size, bufferlist *bl)
 {
   Inode *in = f->inode;
 
@@ -4309,7 +4309,7 @@ int Client::_read(Fh *f, __s64 offset, __u64 size, bufferlist *bl)
   return r;
 }
 
-int Client::_read_async(Fh *f, __u64 off, __u64 len, bufferlist *bl)
+int Client::_read_async(Fh *f, uint64_t off, uint64_t len, bufferlist *bl)
 {
   Inode *in = f->inode;
   bool readahead = true;
@@ -4398,10 +4398,10 @@ int Client::_read_async(Fh *f, __u64 off, __u64 len, bufferlist *bl)
   return r;
 }
 
-int Client::_read_sync(Fh *f, __u64 off, __u64 len, bufferlist *bl)
+int Client::_read_sync(Fh *f, uint64_t off, uint64_t len, bufferlist *bl)
 {
   Inode *in = f->inode;
-  __u64 pos = off;
+  uint64_t pos = off;
   int left = len;
   int read = 0;
 
@@ -4513,9 +4513,9 @@ int Client::write(int fd, const char *buf, loff_t size, loff_t offset)
 }
 
 
-int Client::_write(Fh *f, __s64 offset, __u64 size, const char *buf)
+int Client::_write(Fh *f, int64_t offset, uint64_t size, const char *buf)
 {
-  if ((__u64)(offset+size) > mdsmap->get_max_filesize()) //too large!
+  if ((uint64_t)(offset+size) > mdsmap->get_max_filesize()) //too large!
     return -EFBIG;
 
   if (osdmap->test_flag(CEPH_OSDMAP_FULL))
@@ -4553,7 +4553,7 @@ int Client::_write(Fh *f, __s64 offset, __u64 size, const char *buf)
   bufferlist bl;
   bl.push_back( bp );
 
-  __u64 endoff = offset + size;
+  uint64_t endoff = offset + size;
   int got;
   int r = get_caps(in, CEPH_CAP_FILE_WR, CEPH_CAP_FILE_BUFFER, &got, endoff);
   if (r < 0)
@@ -4604,7 +4604,7 @@ int Client::_write(Fh *f, __s64 offset, __u64 size, const char *buf)
     client_logger->favg(l_c_wrlat,(double)lat);
     
   // assume success for now.  FIXME.
-  __u64 totalwritten = size;
+  uint64_t totalwritten = size;
   
   // extend file?
   if (totalwritten + offset > in->size) {
@@ -4835,7 +4835,7 @@ int Client::sync_fs()
   return _sync_fs();
 }
 
-__s64 Client::drop_caches()
+int64_t Client::drop_caches()
 {
   Mutex::Locker l(client_lock);
   return objectcacher->release_all();
index ff735e2a790885236058dd9e3ffd55bfd529787e..5f328e24f851aece365d15b15b016c8fd9bede6d 100644 (file)
@@ -95,7 +95,7 @@ class Inode;
 class Dentry;
 
 struct MetaRequest {
-  __u64 tid;
+  uint64_t tid;
   ceph_mds_request_head head;
   filepath path, path2;
   bufferlist data;
@@ -200,9 +200,9 @@ struct MetaRequest {
 
 struct MDSSession {
   version_t seq;
-  __u64 cap_gen;
+  uint64_t cap_gen;
   utime_t cap_ttl, last_cap_renew_request;
-  __u64 cap_renew_seq;
+  uint64_t cap_renew_seq;
   int num_caps;
   entity_inst_t inst;
   bool closing;
@@ -231,7 +231,7 @@ class Dentry : public LRUObject {
   int     ref;                       // 1 if there's a dir beneath me.
   int lease_mds;
   utime_t lease_ttl;
-  __u64 lease_gen;
+  uint64_t lease_gen;
   ceph_seq_t lease_seq;
   int cap_shared_gen;
   
@@ -251,7 +251,7 @@ class Dir {
  public:
   Inode    *parent_inode;  // my inode
   hash_map<nstring, Dentry*> dentries;
-  __u64 release_count;
+  uint64_t release_count;
 
   Dir(Inode* in) : release_count(0) { parent_inode = in; }
 
@@ -305,11 +305,11 @@ struct InodeCap {
   Inode *inode;
   xlist<InodeCap*>::item cap_item;
 
-  __u64 cap_id;
+  uint64_t cap_id;
   unsigned issued;
   unsigned implemented;
   unsigned wanted;   // as known to mds.
-  __u64 seq, issue_seq;
+  uint64_t seq, issue_seq;
   __u32 mseq;  // migration seq
   __u32 gen;
 
@@ -321,11 +321,11 @@ struct CapSnap {
   //snapid_t follows;  // map key
   SnapContext context;
   int issued, dirty;
-  __u64 size;
+  uint64_t size;
   utime_t ctime, mtime, atime;
   version_t time_warp_seq;
   bool writing, dirty_data;
-  __u64 flush_tid;
+  uint64_t flush_tid;
   CapSnap() : issued(0), dirty(0), size(0), time_warp_seq(0), writing(false), dirty_data(false), flush_tid(0) {}
 };
 
@@ -360,7 +360,7 @@ class Inode {
   utime_t    atime;   // file data access time.
   uint32_t   time_warp_seq;  // count of (potential) mtime/atime timewarps (i.e., utimes())
 
-  __u64 max_size;  // max size we can write to
+  uint64_t max_size;  // max size we can write to
 
   // dirfrag, recursive accountin
   frag_info_t dirstat;
@@ -385,7 +385,7 @@ class Inode {
   map<int,InodeCap*> caps;            // mds -> InodeCap
   InodeCap *auth_cap;
   unsigned dirty_caps, flushing_caps;
-  __u64 flushing_cap_seq;
+  uint64_t flushing_cap_seq;
   __u16 flushing_cap_tid[CEPH_CAP_BITS];
   int shared_gen, cache_gen;
   int snap_caps, snap_cap_refs;
@@ -407,7 +407,7 @@ class Inode {
 
   ObjectCacher::ObjectSet oset;
 
-  __u64     reported_size, wanted_max_size, requested_max_size;
+  uint64_t     reported_size, wanted_max_size, requested_max_size;
 
   int       ref;      // ref count. 1 for each dentry, fh that links to me.
   int       ll_ref;   // separate ref count for ll client
@@ -753,7 +753,7 @@ class Client : public Dispatcher {
 
     Inode *inode;
     int64_t offset;   // high bits: frag_t, low bits: an offset
-    __u64 release_count;
+    uint64_t release_count;
     map<frag_t, vector<DirEntry> > buffer;
 
     DirResult(Inode *in) : inode(in), offset(0), release_count(0) { 
@@ -1105,7 +1105,7 @@ protected:
 
   // file caps
   void check_cap_issue(Inode *in, InodeCap *cap, unsigned issued);
-  void add_update_cap(Inode *in, int mds, __u64 cap_id,
+  void add_update_cap(Inode *in, int mds, uint64_t cap_id,
                      unsigned issued, unsigned seq, unsigned mseq, inodeno_t realm,
                      int flags);
   void remove_cap(Inode *in, int mds);
@@ -1129,12 +1129,12 @@ protected:
   void handle_cap_flushsnap_ack(Inode *in, class MClientCaps *m);
   void handle_cap_grant(Inode *in, int mds, InodeCap *cap, class MClientCaps *m);
   void cap_delay_requeue(Inode *in);
-  void send_cap(Inode *in, int mds, InodeCap *cap, int used, int want, int retain, int flush, __u64 tid);
+  void send_cap(Inode *in, int mds, InodeCap *cap, int used, int want, int retain, int flush, uint64_t tid);
   void check_caps(Inode *in, bool is_delayed);
   void get_cap_ref(Inode *in, int cap);
   void put_cap_ref(Inode *in, int cap);
   void flush_snaps(Inode *in);
-  void wait_sync_caps(__u64 want);
+  void wait_sync_caps(uint64_t want);
   void queue_cap_snap(Inode *in, snapid_t seq=0);
   void finish_cap_snap(Inode *in, CapSnap *capsnap, int used);
   void _flushed_cap_snap(Inode *in, snapid_t seq);
@@ -1155,8 +1155,8 @@ protected:
 
   Inode* insert_trace(MetaRequest *request, utime_t ttl, int mds);
   void update_inode_file_bits(Inode *in,
-                             __u64 truncate_seq, __u64 truncate_size, __u64 size,
-                             __u64 time_warp_seq, utime_t ctime, utime_t mtime, utime_t atime,
+                             uint64_t truncate_seq, uint64_t truncate_size, uint64_t size,
+                             uint64_t time_warp_seq, utime_t ctime, utime_t mtime, utime_t atime,
                              int issued);
   Inode *add_update_inode(InodeStat *st, utime_t ttl, int mds);
   void insert_dentry_inode(Dir *dir, const string& dname, LeaseStat *dlease, 
@@ -1182,8 +1182,8 @@ private:
 
   Fh *_create_fh(Inode *in, int flags, int cmode);
 
-  int _read_sync(Fh *f, __u64 off, __u64 len, bufferlist *bl);
-  int _read_async(Fh *f, __u64 off, __u64 len, bufferlist *bl);
+  int _read_sync(Fh *f, uint64_t off, uint64_t len, bufferlist *bl);
+  int _read_async(Fh *f, uint64_t off, uint64_t len, bufferlist *bl);
 
   // internal interface
   //   call these with client_lock held!
@@ -1207,8 +1207,8 @@ private:
   int _create(Inode *in, const char *name, int flags, mode_t mode, Inode **inp, Fh **fhp, int uid=-1, int gid=-1);
   int _release(Fh *fh);
   loff_t _lseek(Fh *fh, loff_t offset, int whence);
-  int _read(Fh *fh, __s64 offset, __u64 size, bufferlist *bl);
-  int _write(Fh *fh, __s64 offset, __u64 size, const char *buf);
+  int _read(Fh *fh, int64_t offset, uint64_t size, bufferlist *bl);
+  int _write(Fh *fh, int64_t offset, uint64_t size, const char *buf);
   int _flush(Fh *fh);
   int _fsync(Fh *fh, bool syncdataonly);
   int _sync_fs();
@@ -1285,7 +1285,7 @@ public:
   int fstat(int fd, struct stat *stbuf);
 
   int sync_fs();
-  __s64 drop_caches();
+  int64_t drop_caches();
 
   // hpc lazyio
   int lazyio_propogate(int fd, loff_t offset, size_t count);
index 53b8a0c08c69f7a40d8e0729bed7d692322439e1..abac8e3f1999ae228ba7d2ce8c4feab0f28abe26 100644 (file)
@@ -1361,7 +1361,7 @@ int SyntheticClient::play_trace(Trace& t, string& prefix, bool metadata_only)
       object_t oid = file_object_t(oh, ol);
       lock.Lock();
       ceph_object_layout layout = client->osdmap->make_object_layout(oid, CEPH_CASDATA_RULE);
-      __u64 size;
+      uint64_t size;
       utime_t mtime;
       client->objecter->stat(oid, layout, CEPH_NOSNAP, &size, &mtime, 0, new C_SafeCond(&lock, &cond, &ack));
       while (!ack) cond.Wait(lock);
@@ -1936,7 +1936,7 @@ int SyntheticClient::write_file(string& fn, int size, loff_t wrsize)   // size i
   
   utime_t from = g_clock.now();
   utime_t start = from;
-  __u64 bytes = 0, total = 0;
+  uint64_t bytes = 0, total = 0;
 
 
   for (loff_t i=0; i<chunks; i++) {
@@ -2044,7 +2044,7 @@ int SyntheticClient::read_file(string& fn, int size, int rdsize, bool ignoreprin
 
   utime_t from = g_clock.now();
   utime_t start = from;
-  __u64 bytes = 0, total = 0;
+  uint64_t bytes = 0, total = 0;
 
   for (unsigned i=0; i<chunks; i++) {
     if (time_to_stop()) break;
@@ -3314,7 +3314,7 @@ int SyntheticClient::chunk_file(string &filename)
 
   struct stat st;
   client->fstat(fd, &st);
-  __u64 size = st.st_size;
+  uint64_t size = st.st_size;
   dout(0) << "file " << filename << " size is " << size << dendl;
 
   Filer *filer = client->filer;
@@ -3324,7 +3324,7 @@ int SyntheticClient::chunk_file(string &filename)
   inode.ino = st.st_ino;
   client->describe_layout(fd, &inode.layout);
 
-  __u64 pos = 0;
+  uint64_t pos = 0;
   bufferlist from_before;
   while (pos < size) {
     int get = MIN(size-pos, 1048576);
index 440cffa3984cb7864fa9dade69d99aab26917079..38c726da77eb68b769847937769b5b3e772e514f 100644 (file)
@@ -31,17 +31,17 @@ static Client *client;
 
 Mutex stag_lock("fuse_ll.cc stag_lock");
 int last_stag = 0;
-hash_map<__u64,int> snap_stag_map;
-hash_map<int,__u64> stag_snap_map;
+hash_map<uint64_t,int> snap_stag_map;
+hash_map<int,uint64_t> stag_snap_map;
 
 #define FINO_INO(x) ((x) & ((1ull<<48)-1ull))
 #define FINO_STAG(x) ((x) >> 48)
 #define MAKE_FINO(i,s) ((i) | ((s) << 48))
 
-static __u64 fino_snap(__u64 fino)
+static uint64_t fino_snap(uint64_t fino)
 {
   Mutex::Locker l(stag_lock);
-  __u64 stag = FINO_STAG(fino);
+  uint64_t stag = FINO_STAG(fino);
   assert(stag_snap_map.count(stag));
   return stag_snap_map[stag];
 }
@@ -53,10 +53,10 @@ static vinodeno_t fino_vino(inodeno_t fino)
 }
 
 
-static __u64 make_fake_ino(inodeno_t ino, snapid_t snapid)
+static uint64_t make_fake_ino(inodeno_t ino, snapid_t snapid)
 {
   Mutex::Locker l(stag_lock);
-  __u64 stag;
+  uint64_t stag;
   if (snap_stag_map.count(snapid) == 0) {
     stag = ++last_stag;
     snap_stag_map[snapid] = stag;
@@ -359,7 +359,7 @@ static void ceph_ll_readdir(fuse_req_t req, fuse_ino_t ino, size_t size,
   struct stat st;
   memset(&st, 0, sizeof(st));
 
-  __u64 snap = fino_snap(ino);
+  uint64_t snap = fino_snap(ino);
 
   while (1) {
     int r = client->readdir_r(dirp, &de);
index 25e4f1a9d059dbf74e1dc10489ff93d74bc34924..5ff11b721e0fcb1f409d6900f1b8d609ff5f61ea 100644 (file)
@@ -8,9 +8,9 @@
 
 /* just use u64 to align sanely on all archs */
 struct ceph_ioctl_layout {
-       __u64 stripe_unit, stripe_count, object_size;
-       __u64 data_pool;
-       __s64 preferred_osd;
+       uint64_t stripe_unit, stripe_count, object_size;
+       uint64_t data_pool;
+       int64_t preferred_osd;
 };
 
 #define CEPH_IOC_GET_LAYOUT _IOR(CEPH_IOCTL_MAGIC, 1,          \
@@ -23,14 +23,14 @@ struct ceph_ioctl_layout {
  * file offset.
  */
 struct ceph_ioctl_dataloc {
-       __u64 file_offset;           /* in+out: file offset */
-       __u64 object_offset;         /* out: offset in object */
-       __u64 object_no;             /* out: object # */
-       __u64 object_size;           /* out: object size */
+       uint64_t file_offset;           /* in+out: file offset */
+       uint64_t object_offset;         /* out: offset in object */
+       uint64_t object_no;             /* out: object # */
+       uint64_t object_size;           /* out: object size */
        char object_name[64];        /* out: object name */
-       __u64 block_offset;          /* out: offset in block */
-       __u64 block_size;            /* out: block length */
-       __s64 osd;                   /* out: osd # */
+       uint64_t block_offset;          /* out: offset in block */
+       uint64_t block_size;            /* out: block length */
+       int64_t osd;                   /* out: osd # */
        struct sockaddr_storage osd_addr; /* out: osd address */
 };
 
index ceb8a4658c4e1553419143a5ee2a34463825ab93..8e4ee2b68c2576f310c37e626ad12720384d3879 100644 (file)
@@ -246,14 +246,14 @@ void Logger::_flush(bool reset)
 
 
 
-__s64 Logger::inc(int key, __s64 v)
+int64_t Logger::inc(int key, int64_t v)
 {
   if (!open || !g_conf.logger)
     return 0;
   logger_lock.Lock();
   int i = type->lookup_key(key);
   vals[i] += v;
-  __s64 r = vals[i];
+  int64_t r = vals[i];
   logger_lock.Unlock();
   return r;
 }
@@ -270,14 +270,14 @@ double Logger::finc(int key, double v)
   return r;
 }
 
-__s64 Logger::set(int key, __s64 v)
+int64_t Logger::set(int key, int64_t v)
 {
   if (!open || !g_conf.logger)
     return 0;
   logger_lock.Lock();
   int i = type->lookup_key(key);
   //cout << this << " set " << i << " to " << v << std::endl;
-  __s64 r = vals[i] = v;
+  int64_t r = vals[i] = v;
   logger_lock.Unlock();
   return r;
 }
@@ -309,13 +309,13 @@ double Logger::favg(int key, double v)
   return r;
 }
 
-__s64 Logger::get(int key)
+int64_t Logger::get(int key)
 {
   if (!open || !g_conf.logger)
     return 0;
   logger_lock.Lock();
   int i = type->lookup_key(key);
-  __s64 r = 0;
+  int64_t r = 0;
   if (i >= 0 && i < (int)vals.size())
     r = vals[i];
   logger_lock.Unlock();
index c8a75115895e89316ac5316c0fe2b827a6f8e345..b04bce2a1d5f7c248535c85983c504acd30dd242 100644 (file)
@@ -39,7 +39,7 @@ class Logger {
   bool open;
 
   // values for this instance
-  vector<__s64> vals;
+  vector<int64_t> vals;
   vector<double> fvals;
   vector< vector<double> > vals_to_avg;  // for calculating variance
 
@@ -60,9 +60,9 @@ class Logger {
 
   void _open_log();
 
-  __s64 inc(int f, __s64 v = 1);
-  __s64 set(int f, __s64 v);
-  __s64 get(int f);
+  int64_t inc(int f, int64_t v = 1);
+  int64_t set(int f, int64_t v);
+  int64_t get(int f);
 
   double fset(int f, double v);
   double finc(int f, double v);
index 69e6aa3276629144e545e27f50142706ffea3f7a..68ca965400f06ebcf8d35fbed479703759a20eb1 100644 (file)
@@ -5,23 +5,23 @@
 #include "Cond.h"
 
 class Throttle {
-  __u64 count, want, max;
+  uint64_t count, want, max;
   Mutex lock;
   Cond cond;
   
 public:
-  Throttle(__u64 m = 0) : count(0), max(m),
+  Throttle(uint64_t m = 0) : count(0), max(m),
                          lock("Throttle::lock") {}
 
 private:
-  void _reset_max(__u64 m) {
+  void _reset_max(uint64_t m) {
     if (m) {
       if (m < max)
        cond.SignalAll();
       max = m;
     }
   }
-  bool _wait(__u64 c) {
+  bool _wait(uint64_t c) {
     bool waited = false;
     while (max && count + c > max) {
       waited = true;
@@ -31,24 +31,24 @@ private:
   }
 
 public:
-  __u64 get_current() {
+  uint64_t get_current() {
     Mutex::Locker l(lock);
     return count;
   }
 
-  bool wait(__u64 m = 0) {
+  bool wait(uint64_t m = 0) {
     Mutex::Locker l(lock);
     _reset_max(m);
     return _wait(0);
   }
 
-  __u64 take(__u64 c = 1) {
+  uint64_t take(uint64_t c = 1) {
     Mutex::Locker l(lock);
     count += c;
     return count;
   }
 
-  bool get(__u64 c = 1, __u64 m = 0) {
+  bool get(uint64_t c = 1, uint64_t m = 0) {
     Mutex::Locker l(lock);
     _reset_max(m);
     bool waited = _wait(c);
@@ -56,7 +56,7 @@ public:
     return waited;
   }
 
-  __u64 put(__u64 c = 1) {
+  uint64_t put(uint64_t c = 1) {
     Mutex::Locker l(lock);
     cond.SignalAll();
     count -= c;
index 13a0a2da3fc288992dc785e83fa4bffb2299d8ab..5505097ee5ddafe556441c3f1943079cff710dd7 100644 (file)
@@ -8,7 +8,7 @@ object_t calc_cas_name(bufferlist &bl)
 }
 
 
-void find_rabin_markers(bufferlist &bl, __u64 bloff, list<__u64> &chunks_offsets)
+void find_rabin_markers(bufferlist &bl, uint64_t bloff, list<uint64_t> &chunks_offsets)
 {
   
   
index 097a980cf755f721c0f4120612c96d2242812c9c..dd6184e371266b274791a9f7e7ff10db9d2e12a7 100644 (file)
@@ -113,7 +113,7 @@ int _dout_rename_output_file()  // after calling daemon()
   return 0;
 }
 
-int _dout_create_courtesy_output_symlink(const char *type, __s64 n)
+int _dout_create_courtesy_output_symlink(const char *type, int64_t n)
 {
   char name[20];
   snprintf(name, sizeof(name), "%s%lld", type, (unsigned long long)n);
index 95c261e322e74fbc5bb0237277a28fdc607cddfd..792b379a1feb64428611e26d39a3789f5a87a0d1 100644 (file)
@@ -22,7 +22,7 @@ extern bool _dout_is_open;
 
 extern void _dout_open_log();
 extern int _dout_rename_output_file();  // after calling daemon()
-extern int _dout_create_courtesy_output_symlink(const char *type, __s64 n);
+extern int _dout_create_courtesy_output_symlink(const char *type, int64_t n);
 extern int _dout_create_courtesy_output_symlink(const char *name);
 
 static inline void _dout_check_log() {
index d9c651e2a5ef2d4ad6580fa45560d0a9e534b3b2..1d2fe37a122619620fddb6e0cd222a26ec6fd376 100644 (file)
@@ -204,7 +204,7 @@ struct md_config_t {
   long long unsigned journaler_batch_max;
   
   // mds
-  __u64 mds_max_file_size;
+  uint64_t mds_max_file_size;
   int   mds_cache_size;
   float mds_cache_mid;
   int   mds_mem_max;
index d30fa60a044e7bfe36d728c90b4e08d5b21efdf2..10a121d7072b98ec0a8454bcd6c4b3d127b719b5 100644 (file)
@@ -111,9 +111,9 @@ int main(int argc, const char **argv, const char *envp[])
     cond.Wait(lock);
   lock.Unlock();
   
-  __u64 start = journaler->get_read_pos();
-  __u64 end = journaler->get_write_pos();
-  __u64 len = end-start;
+  uint64_t start = journaler->get_read_pos();
+  uint64_t end = journaler->get_write_pos();
+  uint64_t len = end-start;
   cout << "journal is " << start << "~" << len << std::endl;
 
   Filer filer(objecter);
index d0adbbda0e5487a778d0e1f22dd7b3d4a5ed87c9..e3c958a668e32dbfccdaacfc26d8d35641388cd9 100644 (file)
@@ -641,8 +641,8 @@ int BlockDevice::_read(int fd, block_t bno, unsigned num, bufferlist& bl)
 
   assert(fd > 0);
   
-  __u64 offset = bno * EBOFS_BLOCK_SIZE;
-  __u64 actual = ::lseek64(fd, offset, SEEK_SET);
+  uint64_t offset = bno * EBOFS_BLOCK_SIZE;
+  uint64_t actual = ::lseek64(fd, offset, SEEK_SET);
   assert(actual == offset);
   
   size_t len = num*EBOFS_BLOCK_SIZE;
@@ -677,9 +677,9 @@ int BlockDevice::_write(int fd, unsigned bno, unsigned num, bufferlist& bl)
   assert(fd > 0);
   
   while (1) {
-    __u64 offset = (__u64)bno << EBOFS_BLOCK_BITS;
-    assert((__u64)bno * (__u64)EBOFS_BLOCK_SIZE == offset);
-    __u64 actual = ::lseek64(fd, offset, SEEK_SET);
+    uint64_t offset = (uint64_t)bno << EBOFS_BLOCK_BITS;
+    assert((uint64_t)bno * (uint64_t)EBOFS_BLOCK_SIZE == offset);
+    uint64_t actual = ::lseek64(fd, offset, SEEK_SET);
     assert(actual == offset);
     
     // write buffers
index d909b5e0ee5995ded2bc0410b6ecaa31f822bc8f..5866ce10cd29f74d0f1fde0397fe2c3074218070 100644 (file)
 
 #define DOUT_SUBSYS ebofs
 
-void do_apply_partial(bufferlist& bl, map<__u64, bufferlist>& pm) 
+void do_apply_partial(bufferlist& bl, map<uint64_t, bufferlist>& pm) 
 {
   assert(bl.length() == (unsigned)EBOFS_BLOCK_SIZE);
   //assert(partial_is_complete());
   //cout << "apply_partial" << std::endl;
-  for (map<__u64, bufferlist>::iterator i = pm.begin();
+  for (map<uint64_t, bufferlist>::iterator i = pm.begin();
        i != pm.end();
        i++) {
     //cout << "do_apply_partial at " << i->first << "~" << i->second.length() << std::endl;
@@ -41,7 +41,7 @@ void do_apply_partial(bufferlist& bl, map<__u64, bufferlist>& pm)
 #define dout_prefix *_dout << dbeginl << "ebofs." << *this << "."
 
 
-void BufferHead::add_partial(__u64 off, bufferlist& p) 
+void BufferHead::add_partial(uint64_t off, bufferlist& p) 
 {
   unsigned len = p.length();
   assert(len <= (unsigned)EBOFS_BLOCK_SIZE);
@@ -49,7 +49,7 @@ void BufferHead::add_partial(__u64 off, bufferlist& p)
   assert(off + len <= EBOFS_BLOCK_SIZE);
   
   // trim any existing that overlaps
-  map<__u64, bufferlist>::iterator i = partial.begin();
+  map<uint64_t, bufferlist>::iterator i = partial.begin();
   while (i != partial.end()) {
     // is [off,off+len)...
     // past i?
@@ -80,7 +80,7 @@ void BufferHead::add_partial(__u64 off, bufferlist& p)
     // overlap head of i?
     if (off <= i->first && off+len < i->first + i->second.length()) {
       // move i (make new tail).
-      __u64 tailoff = off+len;
+      uint64_t tailoff = off+len;
       unsigned trim = tailoff - i->first;
       partial[tailoff].substr_of(i->second, trim, i->second.length()-trim);
       partial.erase(i++);   // should now be at tailoff
@@ -224,9 +224,9 @@ void ObjectCache::rx_finish(ioh_t ioh, block_t start, block_t length, bufferlist
       assert(exv[0].start != 0);
       block_t cur_block = exv[0].start;
       
-      __u64 off_in_bl = (bh->start() - start) * EBOFS_BLOCK_SIZE;
+      uint64_t off_in_bl = (bh->start() - start) * EBOFS_BLOCK_SIZE;
       assert(off_in_bl >= 0);
-      __u64 len_in_bl = bh->length() * EBOFS_BLOCK_SIZE;
+      uint64_t len_in_bl = bh->length() * EBOFS_BLOCK_SIZE;
 
       // verify csum
       csum_t want = *bh->oc->on->get_extent_csum_ptr(bh->start(), 1);
@@ -239,16 +239,16 @@ void ObjectCache::rx_finish(ioh_t ioh, block_t start, block_t length, bufferlist
        *bh->oc->on->get_extent_csum_ptr(bh->start(), 1) = got;
        bh->oc->on->data_csum += got - want;
        
-       interval_set<__u64> bad;
+       interval_set<uint64_t> bad;
        bad.insert(bh->start()*EBOFS_BLOCK_SIZE, EBOFS_BLOCK_SIZE);
        bh->oc->on->bad_byte_extents.union_of(bad);
 
-       interval_set<__u64> over;
-       for (map<__u64,bufferlist>::iterator q = bh->partial.begin();
+       interval_set<uint64_t> over;
+       for (map<uint64_t,bufferlist>::iterator q = bh->partial.begin();
             q != bh->partial.end();
             q++)
          over.insert(bh->start()*EBOFS_BLOCK_SIZE+q->first, q->second.length());
-       interval_set<__u64> new_over;
+       interval_set<uint64_t> new_over;
        new_over.intersection_of(over, bh->oc->on->bad_byte_extents);
        bh->oc->on->bad_byte_extents.subtract(new_over);
       }
index 133b15d4231b6d9b0a8e31bbea91575268c91c70..86173c74e97d57cbbd0a9d706cd45180d7f4872d 100644 (file)
@@ -55,7 +55,7 @@ class BufferHead : public LRUObject {
   ioh_t     tx_ioh;         // 
   block_t   tx_block;
 
-  map<__u64, bufferlist>     partial;   // partial dirty content overlayed onto incoming data
+  map<uint64_t, bufferlist>     partial;   // partial dirty content overlayed onto incoming data
 
   map<block_t, list<Context*> > waitfor_read;
   
@@ -173,8 +173,8 @@ class BufferHead : public LRUObject {
     shadows.clear();
   }
 
-  void copy_partial_substr(__u64 start, __u64 end, bufferlist& bl) {
-    map<__u64, bufferlist>::iterator i = partial.begin();
+  void copy_partial_substr(uint64_t start, uint64_t end, bufferlist& bl) {
+    map<uint64_t, bufferlist>::iterator i = partial.begin();
     
     // skip first bits (fully to left)
     while ((i->first + i->second.length() < start) &&
@@ -188,7 +188,7 @@ class BufferHead : public LRUObject {
     unsigned bhlen = MIN(end-start, i->second.length());
     bl.substr_of( i->second, bhoff, bhlen );
 
-    __u64 pos = i->first + i->second.length();
+    uint64_t pos = i->first + i->second.length();
     
     // have continuous to end?
     for (i++; i != partial.end(); i++) {
@@ -212,8 +212,8 @@ class BufferHead : public LRUObject {
     assert(bl.length() == (unsigned)(end-start));
   }
 
-  bool have_partial_range(__u64 start, __u64 end) {
-    map<__u64, bufferlist>::iterator i = partial.begin();
+  bool have_partial_range(uint64_t start, uint64_t end) {
+    map<uint64_t, bufferlist>::iterator i = partial.begin();
 
     // skip first bits (fully to left)
     while ((i->first + i->second.length() < start) &&
@@ -223,7 +223,7 @@ class BufferHead : public LRUObject {
 
     // have start?
     if (i->first > start) return false;
-    __u64 pos = i->first + i->second.length();
+    uint64_t pos = i->first + i->second.length();
 
     // have continuous to end?
     for (i++; i != partial.end(); i++) {
@@ -238,12 +238,12 @@ class BufferHead : public LRUObject {
     return false;
   }
 
-  bool partial_is_complete(__u64 size) {
+  bool partial_is_complete(uint64_t size) {
     return have_partial_range( 0, MIN(size, EBOFS_BLOCK_SIZE) );
   }
 
   void apply_partial();
-  void add_partial(__u64 off, bufferlist& p);
+  void add_partial(uint64_t off, bufferlist& p);
 
   void take_read_waiters(list<Context*>& finished) {
     for (map<block_t,list<Context*> >::iterator p = waitfor_read.begin();
@@ -455,13 +455,13 @@ class BufferCache {
   Cond  flush_cond;
   int   stat_waiter;
 
-  __u64 stat_all;
-  __u64 stat_clean, stat_corrupt;
-  __u64 stat_dirty;
-  __u64 stat_rx;
-  __u64 stat_tx;
-  __u64 stat_partial;
-  __u64 stat_missing;
+  uint64_t stat_all;
+  uint64_t stat_clean, stat_corrupt;
+  uint64_t stat_dirty;
+  uint64_t stat_rx;
+  uint64_t stat_tx;
+  uint64_t stat_partial;
+  uint64_t stat_missing;
   
   int partial_reads;
 
@@ -480,11 +480,11 @@ class BufferCache {
     {}
 
 
-  __u64 get_size() {
+  uint64_t get_size() {
     assert(stat_clean+stat_dirty+stat_rx+stat_tx+stat_partial+stat_corrupt+stat_missing == stat_all);
     return stat_all;
   }
-  __u64 get_trimmable() {
+  uint64_t get_trimmable() {
     return stat_clean+stat_corrupt;
   }
 
@@ -559,11 +559,11 @@ class BufferCache {
     }
     stat_all -= bh->length();
   }
-  __u64 get_stat_tx() { return stat_tx; }
-  __u64 get_stat_rx() { return stat_rx; }
-  __u64 get_stat_dirty() { return stat_dirty; }
-  __u64 get_stat_clean() { return stat_clean; }
-  __u64 get_stat_partial() { return stat_partial; }
+  uint64_t get_stat_tx() { return stat_tx; }
+  uint64_t get_stat_rx() { return stat_rx; }
+  uint64_t get_stat_dirty() { return stat_dirty; }
+  uint64_t get_stat_clean() { return stat_clean; }
+  uint64_t get_stat_partial() { return stat_partial; }
 
   
   map<version_t, int> &get_unflushed(int what) {
index 4f8307b9d7187bc864b358a8baee651046ca41bc..1112a04f44418d7752b9a9c87a8afbca2119cd90 100644 (file)
@@ -139,7 +139,7 @@ int Ebofs::mount()
       
       while (1) {
        bufferlist bl;
-       __u64 seq;
+       uint64_t seq;
        if (!journal->read_entry(bl, seq)) {
          dout(3) << "mount replay: end of journal, done." << dendl;
          break;
@@ -472,7 +472,7 @@ int Ebofs::commit_thread_entry()
       commit_starting = false;
 
       // --- get ready for a new epoch ---
-      __u64 last_op = op_seq;
+      uint64_t last_op = op_seq;
       super_epoch++;
       dirty = false;
 
@@ -859,7 +859,7 @@ csum_t Ebofs::encode_onode(Onode *on, bufferlist& bl, unsigned& off)
   }
 
   // bad byte extents
-  for (map<__u64,__u64>::iterator p = on->bad_byte_extents.m.begin();
+  for (map<uint64_t,uint64_t>::iterator p = on->bad_byte_extents.m.begin();
        p != on->bad_byte_extents.m.end();
        p++) {
     extent_t o = {p->first, p->second};
@@ -1357,13 +1357,13 @@ void Ebofs::trim_buffer_cache()
   ebofs_lock.Unlock();
 }
 
-void Ebofs::trim_bc(__s64 max)
+void Ebofs::trim_bc(int64_t max)
 {
   if (max < 0)
     max = g_conf.ebofs_bc_size;
   dout(10) << "trim_bc start: size " << bc.get_size() << ", trimmable " << bc.get_trimmable() << ", max " << max << dendl;
 
-  while (bc.get_size() > (__u64)max &&
+  while (bc.get_size() > (uint64_t)max &&
          bc.get_trimmable()) {
     BufferHead *bh = (BufferHead*) bc.lru_rest.lru_expire();
     if (!bh) break;
@@ -1637,11 +1637,11 @@ void Ebofs::alloc_write(Onode *on,
 }
 
 
-int Ebofs::check_partial_edges(Onode *on, __u64 off, __u64 len, 
+int Ebofs::check_partial_edges(Onode *on, uint64_t off, uint64_t len, 
                               bool &partial_head, bool &partial_tail)
 {
   // partial block overwrite at head or tail?
-  __u64 last_block_byte = on->last_block * EBOFS_BLOCK_SIZE;
+  uint64_t last_block_byte = on->last_block * EBOFS_BLOCK_SIZE;
   partial_head = (off < last_block_byte) && (off & EBOFS_BLOCK_MASK);
   partial_tail = ((off+len) < on->object_size) && ((off+len) & EBOFS_BLOCK_MASK);
   dout(10) << "check_partial_edges on " << *on << " " << off << "~" << len 
@@ -1684,9 +1684,9 @@ int Ebofs::check_partial_edges(Onode *on, __u64 off, __u64 len,
        return -1;
       }
       if (bh->is_partial()) {
-       __u64 off_in_bh = off & EBOFS_BLOCK_MASK;
-       __u64 end_in_bh = MAX(EBOFS_BLOCK_SIZE, off_in_bh+len);
-       __u64 end = EBOFS_BLOCK_SIZE;
+       uint64_t off_in_bh = off & EBOFS_BLOCK_MASK;
+       uint64_t end_in_bh = MAX(EBOFS_BLOCK_SIZE, off_in_bh+len);
+       uint64_t end = EBOFS_BLOCK_SIZE;
        if (bh->end()*EBOFS_BLOCK_SIZE > last_block_byte)
          end = last_block_byte & EBOFS_BLOCK_MASK;
        if (!(off_in_bh == 0 || bh->have_partial_range(0, off_in_bh)) ||
@@ -1702,7 +1702,7 @@ int Ebofs::check_partial_edges(Onode *on, __u64 off, __u64 len,
   return 0;
 }
 
-int Ebofs::apply_write(Onode *on, __u64 off, __u64 len, const bufferlist& bl)
+int Ebofs::apply_write(Onode *on, uint64_t off, uint64_t len, const bufferlist& bl)
 {
   ObjectCache *oc = on->get_oc(&bc);
   //oc->scrub_csums();
@@ -1710,8 +1710,8 @@ int Ebofs::apply_write(Onode *on, __u64 off, __u64 len, const bufferlist& bl)
   assert(bl.length() == len);
 
   // map into blocks
-  __u64 opos = off;        // byte pos in object
-  __u64 left = len;        // bytes left
+  uint64_t opos = off;        // byte pos in object
+  uint64_t left = len;        // bytes left
   block_t bstart = off / EBOFS_BLOCK_SIZE;
   block_t blast = (len+off-1) / EBOFS_BLOCK_SIZE;
   block_t blen = blast-bstart+1;
@@ -1724,7 +1724,7 @@ int Ebofs::apply_write(Onode *on, __u64 off, __u64 len, const bufferlist& bl)
   // -- starting changing stuff --
 
   // extending object?
-  __u64 old_object_size = on->object_size;
+  uint64_t old_object_size = on->object_size;
   if (off+len > on->object_size) {
     dout(10) << "apply_write extending size on " << *on << ": " << on->object_size 
              << " -> " << off+len << dendl;
@@ -1819,8 +1819,8 @@ int Ebofs::apply_write(Onode *on, __u64 off, __u64 len, const bufferlist& bl)
 
        if (bh->is_corrupt()) {
          dout(10) << "apply_write  marking non-overwritten bytes bad on corrupt " << *bh << dendl;
-         interval_set<__u64> bad;
-         __u64 bs = bh->start() * EBOFS_BLOCK_SIZE;
+         interval_set<uint64_t> bad;
+         uint64_t bs = bh->start() * EBOFS_BLOCK_SIZE;
          if (off_in_bh) bad.insert(bs, bs+off_in_bh);
          if (off_in_bh+len_in_bh < (unsigned)EBOFS_BLOCK_SIZE)
            bad.insert(bs+off_in_bh+len_in_bh, bs+EBOFS_BLOCK_SIZE-off_in_bh-len_in_bh);
@@ -1955,10 +1955,10 @@ int Ebofs::apply_write(Onode *on, __u64 off, __u64 len, const bufferlist& bl)
 
     // ok
     //  we're now writing up to a block boundary, or EOF.
-    assert(off_in_bh+left >= (__u64)(EBOFS_BLOCK_SIZE*bh->length()) ||
+    assert(off_in_bh+left >= (uint64_t)(EBOFS_BLOCK_SIZE*bh->length()) ||
            (opos+left) >= on->object_size);
 
-    unsigned len_in_bh = MIN((__u64)bh->length()*EBOFS_BLOCK_SIZE - off_in_bh, 
+    unsigned len_in_bh = MIN((uint64_t)bh->length()*EBOFS_BLOCK_SIZE - off_in_bh, 
                             left);
     assert(len_in_bh <= left);
 
@@ -1986,8 +1986,8 @@ int Ebofs::apply_write(Onode *on, __u64 off, __u64 len, const bufferlist& bl)
       // zero leader?
       if (off_in_bh &&
          opos > old_object_size) {
-       __u64 zstart = MAX(0, old_object_size-(__u64)bh->start()*EBOFS_BLOCK_SIZE);
-       __u64 zlen = off_in_bh - zstart;
+       uint64_t zstart = MAX(0, old_object_size-(uint64_t)bh->start()*EBOFS_BLOCK_SIZE);
+       uint64_t zlen = off_in_bh - zstart;
        dout(15) << "apply_write zeroing bh lead over " << zstart << "~" << zlen << dendl;
        bh->data.zero(zstart, zlen);
       }
@@ -1999,8 +1999,8 @@ int Ebofs::apply_write(Onode *on, __u64 off, __u64 len, const bufferlist& bl)
 
       // zero the past-eof tail, too, to be tidy.
       if (len_in_bh < bh->data.length()) {
-       __u64 zstart = off_in_bh+len_in_bh;
-       __u64 zlen = bh->data.length()-(off_in_bh+len_in_bh);
+       uint64_t zstart = off_in_bh+len_in_bh;
+       uint64_t zlen = bh->data.length()-(off_in_bh+len_in_bh);
        bh->data.zero(zstart, zlen);
        dout(15) << "apply_write zeroing bh tail over " << zstart << "~" << zlen << dendl;
       }
@@ -2043,7 +2043,7 @@ int Ebofs::apply_write(Onode *on, __u64 off, __u64 len, const bufferlist& bl)
 }
 
 
-int Ebofs::apply_zero(Onode *on, __u64 off, size_t len)
+int Ebofs::apply_zero(Onode *on, uint64_t off, size_t len)
 {
   dout(10) << "apply_zero " << off << "~" << len << " on " << *on << dendl;
 
@@ -2130,7 +2130,7 @@ int Ebofs::apply_zero(Onode *on, __u64 off, size_t len)
 
 // *** file i/o ***
 
-int Ebofs::attempt_read(Onode *on, __u64 off, size_t len, bufferlist& bl, 
+int Ebofs::attempt_read(Onode *on, uint64_t off, size_t len, bufferlist& bl, 
                        Cond *will_wait_on, bool *will_wait_on_bool)
 {
   dout(10) << "attempt_read " << *on << " " << off << "~" << len << dendl;
@@ -2143,8 +2143,8 @@ int Ebofs::attempt_read(Onode *on, __u64 off, size_t len, bufferlist& bl,
       return -EIO;
     }
     if (on->bad_byte_extents.end() > off) {
-      __u64 bad = on->bad_byte_extents.start_after(off);
-      if (bad < off+(__u64)len) {
+      uint64_t bad = on->bad_byte_extents.start_after(off);
+      if (bad < off+(uint64_t)len) {
        len = bad-off;
        dout(10) << "attempt_read corrupt (bad byte extent) at " << bad << ", shortening read to " << len << dendl;
       }
@@ -2191,10 +2191,10 @@ int Ebofs::attempt_read(Onode *on, __u64 off, size_t len, bufferlist& bl,
        i != partials.end();
        i++) {
     BufferHead *bh = i->second;
-    __u64 bhstart = (__u64)(bh->start()*EBOFS_BLOCK_SIZE);
-    __u64 bhend = (__u64)(bh->end()*EBOFS_BLOCK_SIZE);
-    __u64 start = MAX( off, bhstart );
-    __u64 end = MIN( off+(__u64)len, bhend );
+    uint64_t bhstart = (uint64_t)(bh->start()*EBOFS_BLOCK_SIZE);
+    uint64_t bhend = (uint64_t)(bh->end()*EBOFS_BLOCK_SIZE);
+    uint64_t start = MAX( off, bhstart );
+    uint64_t end = MIN( off+(uint64_t)len, bhend );
     
     if (!i->second->have_partial_range(start-bhstart, end-bhstart)) {
       // wait on this one
@@ -2212,7 +2212,7 @@ int Ebofs::attempt_read(Onode *on, __u64 off, size_t len, bufferlist& bl,
   map<block_t,BufferHead*>::iterator p = partials.begin();
 
   bl.clear();
-  __u64 pos = off;
+  uint64_t pos = off;
   block_t curblock = bstart;
   while (curblock <= blast) {
     BufferHead *bh = 0;
@@ -2224,10 +2224,10 @@ int Ebofs::attempt_read(Onode *on, __u64 off, size_t len, bufferlist& bl,
       p++;
     } else assert(0);
     
-    __u64 bhstart = (__u64)(bh->start()*EBOFS_BLOCK_SIZE);
-    __u64 bhend = (__u64)(bh->end()*EBOFS_BLOCK_SIZE);
-    __u64 start = MAX( pos, bhstart );
-    __u64 end = MIN( off+(__u64)len, bhend );
+    uint64_t bhstart = (uint64_t)(bh->start()*EBOFS_BLOCK_SIZE);
+    uint64_t bhend = (uint64_t)(bh->end()*EBOFS_BLOCK_SIZE);
+    uint64_t start = MAX( pos, bhstart );
+    uint64_t end = MIN( off+(uint64_t)len, bhend );
 
     if (bh->is_corrupt()) {
       if (bl.length()) {
@@ -2284,7 +2284,7 @@ int Ebofs::attempt_read(Onode *on, __u64 off, size_t len, bufferlist& bl,
  * return value of -1 if onode isn't loaded.  otherwise, the number
  * of extents that need to be read (i.e. # of seeks)  
  */
-int Ebofs::is_cached(coll_t cid, pobject_t oid, __u64 off, size_t len)
+int Ebofs::is_cached(coll_t cid, pobject_t oid, uint64_t off, size_t len)
 {
   ebofs_lock.Lock();
   int r = _is_cached(oid, off, len);
@@ -2292,7 +2292,7 @@ int Ebofs::is_cached(coll_t cid, pobject_t oid, __u64 off, size_t len)
   return r;
 }
 
-int Ebofs::_is_cached(pobject_t oid, __u64 off, size_t len)
+int Ebofs::_is_cached(pobject_t oid, uint64_t off, size_t len)
 {
   if (!have_onode(oid)) {
     dout(7) << "_is_cached " << oid << " " << off << "~" << len << " ... onode  " << dendl;
@@ -2335,14 +2335,14 @@ int Ebofs::_is_cached(pobject_t oid, __u64 off, size_t len)
   */
 }
 
-void Ebofs::trim_from_cache(coll_t cid, pobject_t oid, __u64 off, size_t len)
+void Ebofs::trim_from_cache(coll_t cid, pobject_t oid, uint64_t off, size_t len)
 {
   ebofs_lock.Lock();
   _trim_from_cache(oid, off, len);
   ebofs_lock.Unlock();
 }
 
-void Ebofs::_trim_from_cache(pobject_t oid, __u64 off, size_t len)
+void Ebofs::_trim_from_cache(pobject_t oid, uint64_t off, size_t len)
 {
   // be careful not to load it if we don't have it
   if (!have_onode(oid)) {
@@ -2368,7 +2368,7 @@ void Ebofs::_trim_from_cache(pobject_t oid, __u64 off, size_t len)
 
 
 int Ebofs::read(coll_t cid, pobject_t oid, 
-                __u64 off, size_t len,
+                uint64_t off, size_t len,
                 bufferlist& bl)
 {
   ebofs_lock.Lock();
@@ -2377,7 +2377,7 @@ int Ebofs::read(coll_t cid, pobject_t oid,
   return r;
 }
 
-int Ebofs::_read(pobject_t oid, __u64 off, size_t len, bufferlist& bl)
+int Ebofs::_read(pobject_t oid, uint64_t off, size_t len, bufferlist& bl)
 {
   dout(7) << "_read " << oid << " " << off << "~" << len << dendl;
 
@@ -2400,7 +2400,7 @@ int Ebofs::_read(pobject_t oid, __u64 off, size_t len, bufferlist& bl)
     }
 
     size_t try_len = len ? len:on->object_size;
-    size_t will_read = MIN(off+(__u64)try_len, on->object_size) - off;
+    size_t will_read = MIN(off+(uint64_t)try_len, on->object_size) - off;
     
     bool done;
     r = attempt_read(on, off, will_read, bl, &cond, &done);
@@ -2513,8 +2513,8 @@ unsigned Ebofs::_apply_transaction(Transaction& t)
       {
        coll_t cid = t.get_cid();
         pobject_t oid = t.get_oid();
-        __u64 offset = t.get_length();
-       __u64 len = t.get_length();
+        uint64_t offset = t.get_length();
+       uint64_t len = t.get_length();
         bufferlist& bl = t.get_bl();
         if (_write(cid, oid, offset, len, bl) < 0) {
           dout(7) << "apply_transaction fail on _write" << dendl;
@@ -2527,8 +2527,8 @@ unsigned Ebofs::_apply_transaction(Transaction& t)
       {
        coll_t cid = t.get_cid();
         pobject_t oid = t.get_oid();
-        __u64 offset = t.get_length();
-       __u64 len = t.get_length();
+        uint64_t offset = t.get_length();
+       uint64_t len = t.get_length();
         if (_zero(cid, oid, offset, len) < 0) {
           dout(7) << "apply_transaction fail on _zero" << dendl;
           r &= bit;
@@ -2540,8 +2540,8 @@ unsigned Ebofs::_apply_transaction(Transaction& t)
       {
        coll_t cid = t.get_cid();
         pobject_t oid = t.get_oid();
-        __u64 offset = t.get_length();
-       __u64 len = t.get_length();
+        uint64_t offset = t.get_length();
+       uint64_t len = t.get_length();
         _trim_from_cache(oid, offset, len);
       }
       break;
@@ -2550,7 +2550,7 @@ unsigned Ebofs::_apply_transaction(Transaction& t)
       {
        coll_t cid = t.get_cid();
         pobject_t oid = t.get_oid();
-        __u64 offset = t.get_length();
+        uint64_t offset = t.get_length();
         if (_truncate(cid, oid, offset) < 0) {
           dout(7) << "apply_transaction fail on _truncate" << dendl;
           r &= bit;
@@ -2623,8 +2623,8 @@ unsigned Ebofs::_apply_transaction(Transaction& t)
        coll_t cid = t.get_cid();
         pobject_t oid = t.get_oid();
         pobject_t noid = t.get_oid();
-       __u64 off = t.get_length();
-       __u64 len = t.get_length();
+       uint64_t off = t.get_length();
+       uint64_t len = t.get_length();
        if (_clone_range(cid, oid, noid, off, len) < 0) {
          dout(7) << "apply_transaction fail on _clone_range" << dendl;
          r &= bit;
@@ -2726,7 +2726,7 @@ int Ebofs::_touch(coll_t cid, pobject_t oid)
 }
 
 
-int Ebofs::_write(coll_t cid, pobject_t oid, __u64 offset, size_t length, const bufferlist& bl)
+int Ebofs::_write(coll_t cid, pobject_t oid, uint64_t offset, size_t length, const bufferlist& bl)
 {
   dout(7) << "_write " << cid << " " << oid << " " << offset << "~" << length << dendl;
   assert(bl.length() == length);
@@ -2805,7 +2805,7 @@ int Ebofs::_write(coll_t cid, pobject_t oid, __u64 offset, size_t length, const
   return length;
 }
 
-int Ebofs::_zero(coll_t cid, pobject_t oid, __u64 offset, size_t length)
+int Ebofs::_zero(coll_t cid, pobject_t oid, uint64_t offset, size_t length)
 {
   dout(7) << "_zero " << oid << " " << offset << "~" << length << dendl;
 
@@ -2822,7 +2822,7 @@ int Ebofs::_zero(coll_t cid, pobject_t oid, __u64 offset, size_t length)
 
   if (length > 0 &&
       offset < on->object_size) {
-    if (offset + (__u64)length >= on->object_size) {
+    if (offset + (uint64_t)length >= on->object_size) {
       _truncate(cid, oid, offset);
     } else {
       while (1) {
@@ -2848,7 +2848,7 @@ int Ebofs::_zero(coll_t cid, pobject_t oid, __u64 offset, size_t length)
 
 
 int Ebofs::write(coll_t cid, pobject_t oid, 
-                 __u64 off, size_t len,
+                 uint64_t off, size_t len,
                  const bufferlist& bl, Context *onsafe)
 {
   ebofs_lock.Lock();
@@ -2875,7 +2875,7 @@ int Ebofs::write(coll_t cid, pobject_t oid,
   return r;
 }
 
-int Ebofs::zero(coll_t cid, pobject_t oid, __u64 off, size_t len, Context *onsafe)
+int Ebofs::zero(coll_t cid, pobject_t oid, uint64_t off, size_t len, Context *onsafe)
 {
   ebofs_lock.Lock();
   
@@ -2942,7 +2942,7 @@ int Ebofs::remove(coll_t cid, pobject_t oid, Context *onsafe)
   return r;
 }
 
-int Ebofs::_truncate(coll_t cid, pobject_t oid, __u64 size)
+int Ebofs::_truncate(coll_t cid, pobject_t oid, uint64_t size)
 {
   dout(7) << "_truncate " << oid << " size " << size << dendl;
 
@@ -3001,7 +3001,7 @@ int Ebofs::_truncate(coll_t cid, pobject_t oid, __u64 size)
 }
 
 
-int Ebofs::truncate(coll_t cid, pobject_t oid, __u64 size, Context *onsafe)
+int Ebofs::truncate(coll_t cid, pobject_t oid, uint64_t size, Context *onsafe)
 {
   ebofs_lock.Lock();
   
@@ -3106,7 +3106,7 @@ int Ebofs::_clone(coll_t cid, pobject_t from, pobject_t to)
 }
 
 
-int Ebofs::_clone_range(coll_t cid, pobject_t from, pobject_t to, __u64 off, __u64 len)
+int Ebofs::_clone_range(coll_t cid, pobject_t from, pobject_t to, uint64_t off, uint64_t len)
 {
   dout(7) << "_clone_range " << from << " -> " << to << " " << off << "~" << len << dendl;
 
index 13006bf869d4de85f02bf2ffcb6e2225b29df63d..409688d521b31a7eb86641bd7dd66594ba6a715f 100644 (file)
@@ -50,7 +50,7 @@ protected:
   bool         mounted, unmounting, dirty;
   bool         readonly;
   version_t    super_epoch;
-  __u64        op_seq;
+  uint64_t        op_seq;
   bool         commit_starting;
   bool         commit_thread_started;
   Cond         commit_cond;   // to wake up the commit thread
@@ -174,7 +174,7 @@ protected:
 
   version_t trigger_commit();
   void commit_bc_wait(version_t epoch);
-  void trim_bc(__s64 max = -1);
+  void trim_bc(int64_t max = -1);
 
  public:
   void kick_idle();
@@ -191,7 +191,7 @@ protected:
 
 
  protected:
-  int check_partial_edges(Onode *on, __u64 off, __u64 len, 
+  int check_partial_edges(Onode *on, uint64_t off, uint64_t len, 
                          bool &partial_head, bool &partial_tail);
 
   void alloc_write(Onode *on, 
@@ -199,9 +199,9 @@ protected:
                    interval_set<block_t>& alloc,
                    block_t& old_bfirst, block_t& old_blast,
                   csum_t& old_csum_first, csum_t& old_csum_last);
-  int apply_write(Onode *on, __u64 off, __u64 len, const bufferlist& bl);
-  int apply_zero(Onode *on, __u64 off, size_t len);
-  int attempt_read(Onode *on, __u64 off, size_t len, bufferlist& bl, 
+  int apply_write(Onode *on, uint64_t off, uint64_t len, const bufferlist& bl);
+  int apply_zero(Onode *on, uint64_t off, size_t len);
+  int attempt_read(Onode *on, uint64_t off, size_t len, bufferlist& bl, 
                   Cond *will_wait_on, bool *will_wait_on_bool);
 
   Finisher finisher;
@@ -259,15 +259,15 @@ protected:
   // object interface
   bool exists(coll_t cid, pobject_t);
   int stat(coll_t cid, pobject_t, struct stat*);
-  int read(coll_t cid, pobject_t, __u64 off, size_t len, bufferlist& bl);
-  int is_cached(coll_t cid, pobject_t oid, __u64 off, size_t len);
+  int read(coll_t cid, pobject_t, uint64_t off, size_t len, bufferlist& bl);
+  int is_cached(coll_t cid, pobject_t oid, uint64_t off, size_t len);
 
-  int write(coll_t cid, pobject_t oid, __u64 off, size_t len, const bufferlist& bl, Context *onsafe);
-  int zero(coll_t cid, pobject_t oid, __u64 off, size_t len, Context *onsafe);
-  int truncate(coll_t cid, pobject_t oid, __u64 size, Context *onsafe=0);
+  int write(coll_t cid, pobject_t oid, uint64_t off, size_t len, const bufferlist& bl, Context *onsafe);
+  int zero(coll_t cid, pobject_t oid, uint64_t off, size_t len, Context *onsafe);
+  int truncate(coll_t cid, pobject_t oid, uint64_t size, Context *onsafe=0);
   int remove(coll_t cid, pobject_t oid, Context *onsafe=0);
   bool write_will_block();
-  void trim_from_cache(coll_t cid, pobject_t oid, __u64 off, size_t len);
+  void trim_from_cache(coll_t cid, pobject_t oid, uint64_t off, size_t len);
 
   int rename(pobject_t from, pobject_t to);
   int clone(coll_t cid, pobject_t from, pobject_t to, Context *onsafe);
@@ -325,8 +325,8 @@ private:
   // private interface -- use if caller already holds lock
   unsigned _apply_transaction(Transaction& t);
 
-  int _read(pobject_t oid, __u64 off, size_t len, bufferlist& bl);
-  int _is_cached(pobject_t oid, __u64 off, size_t len);
+  int _read(pobject_t oid, uint64_t off, size_t len, bufferlist& bl);
+  int _is_cached(pobject_t oid, uint64_t off, size_t len);
   int _stat(pobject_t oid, struct stat *st);
   int _getattr(pobject_t oid, const char *name, void *value, size_t size);
   int _getattr(pobject_t oid, const char *name, bufferptr& bp);
@@ -335,13 +335,13 @@ private:
 
   bool _write_will_block();
   int _touch(coll_t cid, pobject_t oid);
-  int _write(coll_t cid, pobject_t oid, __u64 off, size_t len, const bufferlist& bl);
-  void _trim_from_cache(pobject_t oid, __u64 off, size_t len);
-  int _truncate(coll_t cid, pobject_t oid, __u64 size);
-  int _zero(coll_t cid, pobject_t oid, __u64 offset, size_t length);
+  int _write(coll_t cid, pobject_t oid, uint64_t off, size_t len, const bufferlist& bl);
+  void _trim_from_cache(pobject_t oid, uint64_t off, size_t len);
+  int _truncate(coll_t cid, pobject_t oid, uint64_t size);
+  int _zero(coll_t cid, pobject_t oid, uint64_t offset, size_t length);
   int _remove(coll_t cid, pobject_t oid);
   int _clone(coll_t cid, pobject_t from, pobject_t to);
-  int _clone_range(coll_t cid, pobject_t from, pobject_t to, __u64 off, __u64 len);
+  int _clone_range(coll_t cid, pobject_t from, pobject_t to, uint64_t off, uint64_t len);
   int _setattr(pobject_t oid, const char *name, const void *value, size_t size);
   int _setattrs(pobject_t oid, map<nstring,bufferptr>& attrset);
   int _rmattr(pobject_t oid, const char *name);
index c151b51265383e28805259a646e08f195f4f6df8..d715bbc0e61216e12256067aa9b1e546a3674b0c 100644 (file)
@@ -77,8 +77,8 @@ public:
   extent_t onode_loc;
   epoch_t last_alloc_epoch; // epoch i last allocated for
 
-  __u64 object_size;
-  __u64 alloc_blocks, last_block;
+  uint64_t object_size;
+  uint64_t alloc_blocks, last_block;
   csum_t data_csum;
   bool readonly;
 
@@ -87,7 +87,7 @@ public:
   map<nstring, bufferptr> attr;
 
   map<block_t, ExtentCsum>   extent_map;
-  interval_set<__u64> bad_byte_extents;
+  interval_set<uint64_t> bad_byte_extents;
 
   interval_set<block_t> uncommitted;
 
index 9c9f0618b85e0f4c952f98e245c0ac4fda721771..dbbf3989c72ac1eafbd066c1ed73ba0d4b0fb4bd 100644 (file)
 #ifndef __EBOFS_CSUM_H
 #define __EBOFS_CSUM_H
 
-typedef __u64 csum_t;
+typedef uint64_t csum_t;
 
 /*
  * physically and logically aligned buffer.  yay.
  */
-inline __u64 calc_csum(const char *start, int len) {
+inline uint64_t calc_csum(const char *start, int len) {
   // must be 64-bit aligned
   assert(((unsigned long)start & 7) == 0); 
   assert((len & 7) == 0);
   
-  __u64 *p = (__u64*)start;
-  __u64 *end = (__u64*)(start + len);
-  __u64 csum = 0;
+  uint64_t *p = (uint64_t*)start;
+  uint64_t *end = (uint64_t*)(start + len);
+  uint64_t csum = 0;
   while (p < end) {
     csum += *p;
     p++;
@@ -39,13 +39,13 @@ inline __u64 calc_csum(const char *start, int len) {
  * arbitrarily aligned buffer.  buffer alignment must match logical alignment.
  * i.e., buffer content is aligned, but has non-aligned boundaries.
  */
-inline __u64 calc_csum_unaligned(const char *start, int len) {
+inline uint64_t calc_csum_unaligned(const char *start, int len) {
   const char *end = start + len;
-  __u64 csum = 0;
+  uint64_t csum = 0;
   
   // front
   while (start < end && (unsigned long)start & 7) {
-    csum += (__u64)(*start) << (8*(8 - ((unsigned long)start & 7)));
+    csum += (uint64_t)(*start) << (8*(8 - ((unsigned long)start & 7)));
     start++;
   }
   if (start == end) 
@@ -54,13 +54,13 @@ inline __u64 calc_csum_unaligned(const char *start, int len) {
   // middle, aligned
   const char *fastend = end - 7;
   while (start < fastend) {
-    csum += *(__u64*)start;
-    start += sizeof(__u64);
+    csum += *(uint64_t*)start;
+    start += sizeof(uint64_t);
   }
 
   // tail
   while (start < end) {
-    csum += (__u64)(*start) << (8*(8 - ((unsigned long)start & 7)));
+    csum += (uint64_t)(*start) << (8*(8 - ((unsigned long)start & 7)));
     start++;
   }
   return csum;
@@ -70,16 +70,16 @@ inline __u64 calc_csum_unaligned(const char *start, int len) {
 /*
  * arbitrarily aligned buffer, with arbitrary logical alignment
  */
-inline __u64 calc_csum_realign(const char *start, int len, int off) {
+inline uint64_t calc_csum_realign(const char *start, int len, int off) {
   const char *end = start + len;
-  __u64 csum = 0;
+  uint64_t csum = 0;
   
   if (((unsigned long)start & 7) == ((unsigned long)off & 7))
     return calc_csum_unaligned(start, len);     // lucky us, start and off alignment matches.
 
   // do it the slow way.  yucky!
   while (start < end) {
-    csum += (__u64)(*start) << (8*(8 - (off & 7)));
+    csum += (uint64_t)(*start) << (8*(8 - (off & 7)));
     start++; off++;
   }
   return csum;  
index 9cbc000e3f48e662529b69a1cb54edb8044fa03d..298806889490b0aaf35221929949dfa30242a2d4 100644 (file)
@@ -71,8 +71,8 @@ int main(int argc, const char **argv)
       
 
       pobject_t oid(0, 0, object_t(1,2));
-      __u64 pos = 0;
-      __u64 sz = 16;
+      uint64_t pos = 0;
+      uint64_t sz = 16;
 
       bufferlist bl;
       bl.append(crap, sz);
@@ -173,7 +173,7 @@ int main(int argc, const char **argv)
 
 
       char *p = bl.c_str();
-      __u64 o = 0;
+      uint64_t o = 0;
       for (int i=0; i<n; i++) {
         cout << "write at " << o << std::endl;
         for (int j=0;j<l;j++) 
@@ -214,7 +214,7 @@ int main(int argc, const char **argv)
 
       utime_t start = g_clock.now();
 
-      for (__u64 m=0; m<megs; m++) {
+      for (uint64_t m=0; m<megs; m++) {
         //if (m%100 == 0)
           cout << m << " / " << megs << std::endl;
         fs.write(10, bl.length(), 1024LL*1024LL*m, bl, (Context*)0);
@@ -254,7 +254,7 @@ int main(int argc, const char **argv)
       if (1) {
         srand(0);
         for (int i=0; i<10000; i++) {
-          __u64 off = rand() % 1000000;
+          uint64_t off = rand() % 1000000;
           size_t len = 1+rand() % 10000;
           cout << std::endl << i << " writing bit at " << off << " len " << len << std::endl;
           fs.write(10, len, off, bl, (Context*)0);
@@ -263,7 +263,7 @@ int main(int argc, const char **argv)
         }
         fs.remove(10);
         for (int i=0; i<100; i++) {
-          __u64 off = rand() % 1000000;
+          uint64_t off = rand() % 1000000;
           size_t len = 1+rand() % 10000;
           cout << std::endl << i << " writing bit at " << off << " len " << len << std::endl;
           fs.write(10, len, off, bl, (Context*)0);
@@ -275,7 +275,7 @@ int main(int argc, const char **argv)
       if (0) {
         // sequential write
         srand(0);
-        __u64 off = 0;
+        uint64_t off = 0;
         for (int i=0; i<10000; i++) {
           size_t len = 1024*1024;//1+rand() % 10000;
           cout << std::endl << i << " writing bit at " << off << " len " << len << std::endl;
@@ -291,7 +291,7 @@ int main(int argc, const char **argv)
         srand(0);
         for (int i=0; i<100; i++) {
           bufferlist bl;
-          __u64 off = rand() % 1000000;
+          uint64_t off = rand() % 1000000;
           size_t len = rand() % 1000;
           cout << std::endl << "read bit at " << off << " len " << len << std::endl;
           int r = fs.read(10, len, off, bl);
@@ -310,7 +310,7 @@ int main(int argc, const char **argv)
         srand(0);
         for (int i=0; i<100; i++) {
           bufferlist bl;
-          __u64 off = rand() % 1000000;
+          uint64_t off = rand() % 1000000;
           size_t len = 100;
           cout << std::endl << "read bit at " << off << " len " << len << std::endl;
           int r = fs.read(10, len, off, bl);
@@ -327,7 +327,7 @@ int main(int argc, const char **argv)
         // write on empty cache
         srand(0);
         for (int i=0; i<100; i++) {
-          __u64 off = rand() % 1000000;
+          uint64_t off = rand() % 1000000;
           size_t len = 100;
           cout << std::endl <<  "writing bit at " << off << " len " << len << std::endl;
           fs.write(10, len, off, bl, (Context*)0);
index 1c333b14cbbf7ee8cef82f14dab3685d4f8a3dff..729cf28ed3d4202409c05fb660d8305d0143fc0a 100644 (file)
@@ -22,7 +22,7 @@ bool stop = false;
 
 char fingerprint_byte_at(int pos, int seed)
 {
-  __u64 big = ((pos & ~7) / 133) ^ seed;
+  uint64_t big = ((pos & ~7) / 133) ^ seed;
   return ((char*)&big)[pos & 7];
 }
 
@@ -42,8 +42,8 @@ public:
       pobject_t oid;
       oid.oid.ino = (rand() % 1000) + 0x10000000;
       coll_t cid = rand() % 50;
-      __u64 off = rand() % 10000;//0;//rand() % 1000000;
-      __u64 len = 1+rand() % 100000;
+      uint64_t off = rand() % 10000;//0;//rand() % 1000000;
+      uint64_t len = 1+rand() % 100000;
       const char *a = "one";
       if (rand() % 2) a = "two";
       int l = 3;//rand() % 10;
index 5af39f23da8a11b7ec1c023323f8f7cb2c85bbc0..c0fcabbd8c2c5349f47cfe7719cc0f01ff668515 100644 (file)
@@ -69,9 +69,9 @@ struct ebofs_onode {
 
   extent_t onode_loc;       /* this is actually the block we live in */
   pobject_t object_id;    /* for kicks */
-  __u64 readonly;  
+  uint64_t readonly;  
 
-  __s64 object_size;     /* file size in bytes.  should this be 64-bit? */
+  int64_t object_size;     /* file size in bytes.  should this be 64-bit? */
   __u32 alloc_blocks;   // allocated
   csum_t data_csum;
   
@@ -105,7 +105,7 @@ static inline ostream& operator<<(ostream& out, const ebofs_inode_ptr& ptr) {
 
 // tree/set nodes
 //typedef int    nodeid_t;
-typedef __s64 nodeid_t;     // actually, a block number.  FIXME.
+typedef int64_t nodeid_t;     // actually, a block number.  FIXME.
 
 static const unsigned EBOFS_NODE_BLOCKS = 1;
 static const unsigned EBOFS_NODE_BYTES = EBOFS_NODE_BLOCKS * EBOFS_BLOCK_SIZE;
@@ -124,8 +124,8 @@ struct ebofs_nodepool {
 
 struct ebofs_node_ptr {
   nodeid_t nodeid;
-  //__u64 start[EBOFS_NODE_DUP];
-  //__u64 length;
+  //uint64_t start[EBOFS_NODE_DUP];
+  //uint64_t length;
   csum_t csum;
 } __attribute__ ((packed));
 
@@ -139,17 +139,17 @@ struct ebofs_table {
 // super
 typedef uint64_t version_t;
 
-static const __u64 EBOFS_MAGIC = 0x000EB0F5;
+static const uint64_t EBOFS_MAGIC = 0x000EB0F5;
 
 static const int EBOFS_NUM_FREE_BUCKETS = 5;   /* see alloc.h for bucket constraints */
 static const int EBOFS_FREE_BUCKET_BITS = 2;
 
 struct ebofs_super {
-  __u64 s_magic;
-  __u64 fsid;   /* _ebofs_ fsid, mind you, not ceph_fsid_t. */
+  uint64_t s_magic;
+  uint64_t fsid;   /* _ebofs_ fsid, mind you, not ceph_fsid_t. */
 
   epoch_t epoch;             // version of this superblock.
-  __u64 op_seq;              // seq # of last operation we _did_ apply+commit to the store.
+  uint64_t op_seq;              // seq # of last operation we _did_ apply+commit to the store.
 
   uint64_t num_blocks;        /* # blocks in filesystem */
 
index a72f9cad1c31438664963f606f7e2e141c85f824..3d01b95802aafbbf43a3bca12ce96e2e3ca0caba 100644 (file)
 struct CompatSet {
 
   struct Feature {
-    __u64 id;
+    uint64_t id;
     string name;
 
-    Feature(__u64 _id, const char *_name) : id(_id), name(_name) {}
-    Feature(__u64 _id, string& _name) : id(_id), name(_name) {}
+    Feature(uint64_t _id, const char *_name) : id(_id), name(_name) {}
+    Feature(uint64_t _id, string& _name) : id(_id), name(_name) {}
   };
 
   struct FeatureSet {
-    __u64 mask;
-    map <__u64,string> names;
+    uint64_t mask;
+    map <uint64_t,string> names;
 
     FeatureSet() : mask(0), names() {}
     void insert(Feature f) {
@@ -109,11 +109,11 @@ struct CompatSet {
    */
   CompatSet unsupported(CompatSet& other) {
     CompatSet diff;
-    __u64 other_compat =
+    uint64_t other_compat =
       ((other.compat.mask ^ compat.mask) & other.compat.mask);
-    __u64 other_ro_compat =
+    uint64_t other_ro_compat =
       ((other.ro_compat.mask ^ ro_compat.mask) & other.ro_compat.mask);
-    __u64 other_incompat =
+    uint64_t other_incompat =
       ((other.incompat.mask ^ incompat.mask) & other.incompat.mask);
     for (int i = 0; i < 64; ++i) {
       int mask = 1 << i;
index 93911baf4c85a8452e5683344097e0d458f27471..26a61930dc8b6034e28d5134466cf0f4e4d192ae 100644 (file)
@@ -29,10 +29,10 @@ typedef enum {
 struct LogEntryKey {
   entity_inst_t who;
   utime_t stamp;
-  __u64 seq;
+  uint64_t seq;
 
   LogEntryKey() {}
-  LogEntryKey(entity_inst_t w, utime_t t, __u64 s) : who(w), stamp(t), seq(s) {}
+  LogEntryKey(entity_inst_t w, utime_t t, uint64_t s) : who(w), stamp(t), seq(s) {}
 
   void encode(bufferlist& bl) const {
     ::encode(who, bl);
@@ -54,7 +54,7 @@ static inline bool operator==(const LogEntryKey& l, const LogEntryKey& r) {
 struct LogEntry {
   entity_inst_t who;
   utime_t stamp;
-  __u64 seq;
+  uint64_t seq;
   log_type type;
   string msg;
 
index 3907d89020572d2a5908bf710b2e88092049f2b2..0d20145baa3fad88940a7027afcf190d0728b31f 100644 (file)
@@ -20,7 +20,7 @@ static __inline__ __u32 swab32(__u32 val)
          ((val << 8)  & 0xff0000) | 
          ((val << 24)));
 }
-static __inline__ __u64 swab64(__u64 val) 
+static __inline__ uint64_t swab64(uint64_t val) 
 {
   return (( val >> 56) |
          ((val >> 40) & 0xff00ull) |
@@ -74,7 +74,7 @@ MAKE_LE_CLASS(16)
 #define cpu_to_le32(x) (x)
 #define cpu_to_le16(x) (x)
   */
-#define le64_to_cpu(x) ((__u64)x)
+#define le64_to_cpu(x) ((uint64_t)x)
 #define le32_to_cpu(x) ((__u32)x)
 #define le16_to_cpu(x) ((__u16)x)
 
index af79670c2d47f338b358915a309e745ce702b568..ce34b14afa1a66eba4066387b4246becfbb03abe 100644 (file)
@@ -65,22 +65,22 @@ inline void decode(bool &v, bufferlist::iterator& p) {
 // int types
 
 #define WRITE_INTTYPE_ENCODER(type, etype)                             \
-  inline void encode(__##type v, bufferlist& bl) {                     \
+  inline void encode(type v, bufferlist& bl) {                 \
     __##etype e = init_##etype(v);                                     \
     encode_raw(e, bl);                                                 \
   }                                                                    \
-  inline void decode(__##type &v, bufferlist::iterator& p) {           \
+  inline void decode(type &v, bufferlist::iterator& p) {               \
     __##etype e;                                                       \
     decode_raw(e, p);                                                  \
     v = e;                                                             \
   }
 
-WRITE_INTTYPE_ENCODER(u64, le64)
-WRITE_INTTYPE_ENCODER(s64, le64)
-WRITE_INTTYPE_ENCODER(u32, le32)
-WRITE_INTTYPE_ENCODER(s32, le32)
-WRITE_INTTYPE_ENCODER(u16, le16)
-WRITE_INTTYPE_ENCODER(s16, le16)
+WRITE_INTTYPE_ENCODER(uint64_t, le64)
+WRITE_INTTYPE_ENCODER(int64_t, le64)
+WRITE_INTTYPE_ENCODER(uint32_t, le32)
+WRITE_INTTYPE_ENCODER(int32_t, le32)
+WRITE_INTTYPE_ENCODER(uint16_t, le16)
+WRITE_INTTYPE_ENCODER(int16_t, le16)
 
 
 
index 7f95dd74f828e92a8dae7cab35b6734b10c306de..bb1499cada46b10023a75063aa68da55241b72ff 100644 (file)
@@ -57,12 +57,6 @@ template<> struct rjhash<uint64_t> {
   }
 };
 
-template<> struct rjhash<__u64> {
-  inline size_t operator()(const __u64 x) const {
-    return rjhash64(x);
-  }
-};
-
 #if defined(__CYGWIN__) || defined(DARWIN)
 template<> struct rjhash<size_t> {
   inline size_t operator()(const size_t x) const {
index 7e6d85a56ac56a2abe7dbe6f6798936ff52acf2c..60c11b9caa2664420a48c8ab74da64dbdcaa52a4 100644 (file)
@@ -34,7 +34,7 @@ template<typename T>
 class interval_set {
  public:
   map<T,T> m;   // map start -> len  
-  __u64 _size;
+  uint64_t _size;
   
   interval_set() : _size(0) {}
 
index 00e8494bfc550b684f4343b6878a2eba4b301048..f684b8183975b5d8a4b79e33e28281125dcf1d55 100644 (file)
@@ -16,22 +16,22 @@ void rados_deinitialize();
 /* pools */
 typedef void *rados_pool_t;
 typedef void *rados_list_ctx_t;
-typedef __u64 rados_snap_t;
+typedef uint64_t rados_snap_t;
 
 struct rados_pool_stat_t {
-  __u64 num_bytes;    // in bytes
-  __u64 num_kb;       // in KB
-  __u64 num_objects;
-  __u64 num_object_clones;
-  __u64 num_object_copies;  // num_objects * num_replicas
-  __u64 num_objects_missing_on_primary;
-  __u64 num_objects_degraded;
-  __u64 num_rd, num_rd_kb,num_wr, num_wr_kb;
+  uint64_t num_bytes;    // in bytes
+  uint64_t num_kb;       // in KB
+  uint64_t num_objects;
+  uint64_t num_object_clones;
+  uint64_t num_object_copies;  // num_objects * num_replicas
+  uint64_t num_objects_missing_on_primary;
+  uint64_t num_objects_degraded;
+  uint64_t num_rd, num_rd_kb,num_wr, num_wr_kb;
 };
 
 struct rados_statfs_t {
-  __u64 kb, kb_used, kb_avail;
-  __u64 num_objects;
+  uint64_t kb, kb_used, kb_avail;
+  uint64_t num_objects;
 };
 
 int rados_open_pool(const char *name, rados_pool_t *pool);
@@ -41,9 +41,9 @@ int rados_lookup_pool(const char *name);
 void rados_set_snap(rados_pool_t pool, rados_snap_t snap);
 
 int rados_create_pool(const char *name);
-int rados_create_pool_with_auid(const char *name, __u64 auid);
+int rados_create_pool_with_auid(const char *name, uint64_t auid);
 int rados_delete_pool(const rados_pool_t pool);
-int rados_change_pool_auid(const rados_pool_t pool, __u64 auid);
+int rados_change_pool_auid(const rados_pool_t pool, uint64_t auid);
 
 /* objects */
 int rados_list_objects_open(rados_pool_t pool, rados_list_ctx_t *ctx);
@@ -68,7 +68,7 @@ int rados_getxattr(rados_pool_t pool, const char *o, const char *name, char *buf
 int rados_setxattr(rados_pool_t pool, const char *o, const char *name, const char *buf, size_t len);
 
 /* misc */
-int rados_stat(rados_pool_t pool, const char *o, __u64 *psize, time_t *pmtime);
+int rados_stat(rados_pool_t pool, const char *o, uint64_t *psize, time_t *pmtime);
 int rados_tmap_update(rados_pool_t pool, const char *o, const char *cmdbuf, size_t cmdbuflen);
 int rados_exec(rados_pool_t pool, const char *oid, const char *cls, const char *method,
               const char *in_buf, size_t in_len, char *buf, size_t out_len);
index 21dafd5ec4c101da0544e59114670e98502f6b8b..efb6f1b5c519b08708cb091a6739c6f1fc710bc4 100644 (file)
@@ -14,23 +14,23 @@ namespace librados {
 
   typedef void *list_ctx_t;
   typedef void *pool_t;
-  typedef __u64 snap_t;
-  typedef __u64 auid_t;
+  typedef uint64_t snap_t;
+  typedef uint64_t auid_t;
 
   struct statfs_t {
-    __u64 kb, kb_used, kb_avail;
-    __u64 num_objects;
+    uint64_t kb, kb_used, kb_avail;
+    uint64_t num_objects;
   };
 
   struct pool_stat_t {
-    __u64 num_bytes;    // in bytes
-    __u64 num_kb;       // in KB
-    __u64 num_objects;
-    __u64 num_object_clones;
-    __u64 num_object_copies;  // num_objects * num_replicas
-    __u64 num_objects_missing_on_primary;
-    __u64 num_objects_degraded;
-    __u64 num_rd, num_rd_kb, num_wr, num_wr_kb;
+    uint64_t num_bytes;    // in bytes
+    uint64_t num_kb;       // in KB
+    uint64_t num_objects;
+    uint64_t num_object_clones;
+    uint64_t num_object_copies;  // num_objects * num_replicas
+    uint64_t num_objects_missing_on_primary;
+    uint64_t num_objects_degraded;
+    uint64_t num_rd, num_rd_kb, num_wr, num_wr_kb;
   };
 
   typedef void *completion_t;
@@ -62,7 +62,7 @@ public:
   int getxattr(pool_t pool, const std::string& oid, const char *name, bufferlist& bl);
   int setxattr(pool_t pool, const std::string& oid, const char *name, bufferlist& bl);
   int getxattrs(pool_t pool, const std::string& oid, std::map<std::string, bufferlist>& attrset);
-  int stat(pool_t pool, const std::string& oid, __u64 *psize, time_t *pmtime);
+  int stat(pool_t pool, const std::string& oid, uint64_t *psize, time_t *pmtime);
 
   int tmap_update(pool_t pool, const std::string& oid, bufferlist& cmdbl);
   
@@ -83,9 +83,9 @@ public:
                     std::map<std::string,pool_stat_t>& stats);
   int get_fs_stats(statfs_t& result);
 
-  int create_pool(const char *name, __u64 auid=0);
+  int create_pool(const char *name, uint64_t auid=0);
   int delete_pool(const pool_t& pool);
-  int change_pool_auid(const pool_t& pool, __u64 auid);
+  int change_pool_auid(const pool_t& pool, uint64_t auid);
 
   int snap_create(const pool_t pool, const char *snapname);
   int snap_remove(const pool_t pool, const char *snapname);
index 75be694cf69fa8f5abe8192b993b123e1594523d..916dbd95dd76b5c2facba2fdc708d2439c45d5c4 100644 (file)
@@ -81,10 +81,10 @@ namespace __gnu_cxx {
 
 
 struct file_object_t {
-  __u64 ino, bno;
+  uint64_t ino, bno;
   mutable char buf[33];
 
-  file_object_t(__u64 i=0, __u64 b=0) : ino(i), bno(b) {
+  file_object_t(uint64_t i=0, uint64_t b=0) : ino(i), bno(b) {
     buf[0] = 0;
   }
   
@@ -105,11 +105,11 @@ struct file_object_t {
 // snaps
 
 struct snapid_t {
-  __u64 val;
-  snapid_t(__u64 v=0) : val(v) {}
+  uint64_t val;
+  snapid_t(uint64_t v=0) : val(v) {}
   snapid_t operator+=(snapid_t o) { val += o.val; return *this; }
   snapid_t operator++() { ++val; return *this; }
-  operator __u64() const { return val; }  
+  operator uint64_t() const { return val; }  
 };
 
 inline void encode(snapid_t i, bufferlist &bl) { encode(i.val, bl); }
index 395e611147090878064c5a2e30b7e77668843302..97ad86f4ef0dfe61d77880927bee5fadc4e4c703 100644 (file)
@@ -240,8 +240,8 @@ WRITE_RAW_ENCODER(ceph_mon_statfs_reply)
 // some basic types
 
 // NOTE: these must match ceph_fs.h typedefs
-typedef __u64 tid_t;         // transaction id
-typedef __u64 version_t;
+typedef uint64_t tid_t;         // transaction id
+typedef uint64_t version_t;
 typedef __u32 epoch_t;       // map epoch  (32bits -> 13 epochs/second for 10 years)
 
 #define O_LAZY 01000000
@@ -252,9 +252,9 @@ typedef struct ceph_fsid ceph_fsid_t;
 // identify individual mount clients by 64bit value
 
 struct client_t {
-  __s64 v;
+  int64_t v;
 
-  client_t(__s64 _v = -2) : v(_v) {}
+  client_t(int64_t _v = -2) : v(_v) {}
   
   void encode(bufferlist& bl) const {
     ::encode(v, bl);
@@ -272,8 +272,8 @@ static inline bool operator<=(const client_t& l, const client_t& r) { return l.v
 static inline bool operator>(const client_t& l, const client_t& r) { return l.v > r.v; }
 static inline bool operator>=(const client_t& l, const client_t& r) { return l.v >= r.v; }
 
-static inline bool operator>=(const client_t& l, __s64 o) { return l.v >= o; }
-static inline bool operator<(const client_t& l, __s64 o) { return l.v < o; }
+static inline bool operator>=(const client_t& l, int64_t o) { return l.v >= o; }
+static inline bool operator<(const client_t& l, int64_t o) { return l.v < o; }
 
 inline ostream& operator<<(ostream& out, const client_t& c) {
   return out << c.v;
@@ -284,7 +284,7 @@ inline ostream& operator<<(ostream& out, const client_t& c) {
 // --------------------------------------
 // ino
 
-typedef __u64 _inodeno_t;
+typedef uint64_t _inodeno_t;
 
 struct inodeno_t {
   _inodeno_t val;
@@ -416,7 +416,7 @@ struct prettybyte_t {
 
 inline ostream& operator<<(ostream& out, const prettybyte_t& b)
 {
-  __u64 bump_after = 100;
+  uint64_t bump_after = 100;
   if (b.v > bump_after << 60)
     return out << (b.v >> 60) << " EB";    
   if (b.v > bump_after << 50)
@@ -439,7 +439,7 @@ struct kb_t {
 
 inline ostream& operator<<(ostream& out, const kb_t& kb)
 {
-  __u64 bump_after = 100;
+  uint64_t bump_after = 100;
   if (kb.v > bump_after << 40)
     return out << (kb.v >> 40) << " PB";    
   if (kb.v > bump_after << 30)
index 5963c8b3813c00b5c50d7429874f581b54202294..36c078c261c4af66bb8b3e169b0af40449796133 100644 (file)
@@ -105,10 +105,10 @@ public:
   }
 
   // snaps
-  int snap_list(PoolCtx *pool, vector<__u64> *snaps);
-  int snap_lookup(PoolCtx *pool, const char *name, __u64 *snapid);
-  int snap_get_name(PoolCtx *pool, __u64 snapid, std::string *s);
-  int snap_get_stamp(PoolCtx *pool, __u64 snapid, time_t *t);
+  int snap_list(PoolCtx *pool, vector<uint64_t> *snaps);
+  int snap_lookup(PoolCtx *pool, const char *name, uint64_t *snapid);
+  int snap_get_name(PoolCtx *pool, uint64_t snapid, std::string *s);
+  int snap_get_stamp(PoolCtx *pool, uint64_t snapid, time_t *t);
   int snap_create(const rados_pool_t pool, const char* snapname);
   int snap_remove(const rados_pool_t pool, const char* snapname);
 
@@ -118,7 +118,7 @@ public:
   int write_full(PoolCtx& pool, const object_t& oid, bufferlist& bl);
   int read(PoolCtx& pool, const object_t& oid, off_t off, bufferlist& bl, size_t len);
   int remove(PoolCtx& pool, const object_t& oid);
-  int stat(PoolCtx& pool, const object_t& oid, __u64 *psize, time_t *pmtime);
+  int stat(PoolCtx& pool, const object_t& oid, uint64_t *psize, time_t *pmtime);
 
   int tmap_update(PoolCtx& pool, const object_t& oid, bufferlist& cmdbl);
   int exec(PoolCtx& pool, const object_t& oid, const char *cls, const char *method, bufferlist& inbl, bufferlist& outbl);
@@ -595,7 +595,7 @@ int RadosClient::change_pool_auid(const rados_pool_t& pool, unsigned long long a
   return reply;
 }
 
-int RadosClient::snap_list(PoolCtx *pool, vector<__u64> *snaps)
+int RadosClient::snap_list(PoolCtx *pool, vector<uint64_t> *snaps)
 {
   Mutex::Locker l(lock);
   const pg_pool_t *pi = objecter->osdmap->get_pg_pool(pool->poolid);
@@ -606,7 +606,7 @@ int RadosClient::snap_list(PoolCtx *pool, vector<__u64> *snaps)
   return 0;
 }
 
-int RadosClient::snap_lookup(PoolCtx *pool, const char *name, __u64 *snapid)
+int RadosClient::snap_lookup(PoolCtx *pool, const char *name, uint64_t *snapid)
 {
   Mutex::Locker l(lock);
   const pg_pool_t *pi = objecter->osdmap->get_pg_pool(pool->poolid);
@@ -621,7 +621,7 @@ int RadosClient::snap_lookup(PoolCtx *pool, const char *name, __u64 *snapid)
   return -ENOENT;
 }
 
-int RadosClient::snap_get_name(PoolCtx *pool, __u64 snapid, std::string *s)
+int RadosClient::snap_get_name(PoolCtx *pool, uint64_t snapid, std::string *s)
 {
   Mutex::Locker l(lock);
   const pg_pool_t *pi = objecter->osdmap->get_pg_pool(pool->poolid);
@@ -632,7 +632,7 @@ int RadosClient::snap_get_name(PoolCtx *pool, __u64 snapid, std::string *s)
   return 0;
 }
 
-int RadosClient::snap_get_stamp(PoolCtx *pool, __u64 snapid, time_t *t)
+int RadosClient::snap_get_stamp(PoolCtx *pool, uint64_t snapid, time_t *t)
 {
   Mutex::Locker l(lock);
   const pg_pool_t *pi = objecter->osdmap->get_pg_pool(pool->poolid);
@@ -954,7 +954,7 @@ int RadosClient::read(PoolCtx& pool, const object_t& oid, off_t off, bufferlist&
   return bl.length();
 }
 
-int RadosClient::stat(PoolCtx& pool, const object_t& oid, __u64 *psize, time_t *pmtime)
+int RadosClient::stat(PoolCtx& pool, const object_t& oid, uint64_t *psize, time_t *pmtime)
 {
   SnapContext snapc;
 
@@ -963,7 +963,7 @@ int RadosClient::stat(PoolCtx& pool, const object_t& oid, __u64 *psize, time_t *
   bool done;
   int r;
   Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
-  __u64 size;
+  uint64_t size;
   utime_t mtime;
 
   if (!psize)
@@ -1154,7 +1154,7 @@ int Rados::get_pool_stats(std::list<string>& v, std::map<string,pool_stat_t>& re
   return r;
 }
 
-int Rados::create_pool(const char *name, __u64 auid)
+int Rados::create_pool(const char *name, uint64_t auid)
 {
   string str(name);
   if (!client)
@@ -1168,7 +1168,7 @@ int Rados::delete_pool(const rados_pool_t& pool)
   return ((RadosClient *)client)->delete_pool(pool);
 }
 
-int Rados::change_pool_auid(const rados_pool_t& pool, __u64 auid)
+int Rados::change_pool_auid(const rados_pool_t& pool, uint64_t auid)
 {
   if (!client) return -EINVAL;
   return ((RadosClient *)client)->change_pool_auid(pool, auid);
@@ -1283,7 +1283,7 @@ int Rados::setxattr(rados_pool_t pool, const string& o, const char *name, buffer
   return ((RadosClient *)client)->setxattr(*(RadosClient::PoolCtx *)pool, oid, name, bl);
 }
 
-int Rados::stat(rados_pool_t pool, const string& o, __u64 *psize, time_t *pmtime)
+int Rados::stat(rados_pool_t pool, const string& o, uint64_t *psize, time_t *pmtime)
 {
   if (!client)
     return -EINVAL;
@@ -1582,7 +1582,7 @@ extern "C" int rados_create_pool(const char *name)
   return radosp->create_pool(sname);
 }
 
-extern "C" int rados_create_pool_with_auid(const char *name, __u64 auid)
+extern "C" int rados_create_pool_with_auid(const char *name, uint64_t auid)
 {
   string sname(name);
   return radosp->create_pool(sname, auid);
@@ -1593,7 +1593,7 @@ extern "C" int rados_delete_pool(const rados_pool_t pool)
   return radosp->delete_pool(pool);
 }
 
-extern "C" int rados_change_pool_auid(const rados_pool_t pool, __u64 auid)
+extern "C" int rados_change_pool_auid(const rados_pool_t pool, uint64_t auid)
 {
   return radosp->change_pool_auid(pool, auid);
 }
@@ -1615,7 +1615,7 @@ extern "C" int rados_snap_remove(const rados_pool_t pool, const char *snapname)
 extern "C" int rados_snap_list(rados_pool_t pool, rados_snap_t *snaps, int maxlen)
 {
   RadosClient::PoolCtx *ctx = (RadosClient::PoolCtx *)pool;
-  vector<__u64> snapvec;
+  vector<uint64_t> snapvec;
   int r = radosp->snap_list(ctx, &snapvec);
   if (r < 0)
     return r;
@@ -1630,7 +1630,7 @@ extern "C" int rados_snap_list(rados_pool_t pool, rados_snap_t *snaps, int maxle
 extern "C" int rados_snap_lookup(rados_pool_t pool, const char *name, rados_snap_t *id)
 {
   RadosClient::PoolCtx *ctx = (RadosClient::PoolCtx *)pool;
-  return radosp->snap_lookup(ctx, name, (__u64 *)id);
+  return radosp->snap_lookup(ctx, name, (uint64_t *)id);
 }
 
 extern "C" int rados_snap_get_name(rados_pool_t pool, rados_snap_t id, char *name, int maxlen)
@@ -1673,7 +1673,7 @@ extern "C" int rados_setxattr(rados_pool_t pool, const char *o, const char *name
   return radosp->setxattr(*ctx, oid, name, bl);
 }
 
-extern "C" int rados_stat(rados_pool_t pool, const char *o, __u64 *psize, time_t *pmtime)
+extern "C" int rados_stat(rados_pool_t pool, const char *o, uint64_t *psize, time_t *pmtime)
 {
   RadosClient::PoolCtx *ctx = (RadosClient::PoolCtx *)pool;
   object_t oid(o);
index b0a4ca762ace1ad8e265426ad30ecdc85ace6ec8..26e61da76eb8787be9a433154de9438646d1eed8 100644 (file)
@@ -113,7 +113,7 @@ void AnchorServer::dec(inodeno_t ino)
 
 // server
 
-void AnchorServer::_prepare(bufferlist &bl, __u64 reqid, int bymds)
+void AnchorServer::_prepare(bufferlist &bl, uint64_t reqid, int bymds)
 {
   bufferlist::iterator p = bl.begin();
   __u32 what;
index a868f40930f2d59bdbd2d1a71757c4485e9cbbfa..cf0dc3043e723cb17c13bcc5660fcf3606418054 100644 (file)
@@ -56,7 +56,7 @@ class AnchorServer : public MDSTableServer {
   void dump();
 
   // server bits
-  void _prepare(bufferlist &bl, __u64 reqid, int bymds);
+  void _prepare(bufferlist &bl, uint64_t reqid, int bymds);
   void _commit(version_t tid);
   void _rollback(version_t tid);
   void handle_query(MMDSTableRequest *m);
index 0294bb08fdea00da617cf7fb56ed62677942269c..34eb5bdceace87ffe70d4eb0c417f9c14fddabe5 100644 (file)
@@ -137,7 +137,7 @@ pair<int,int> CDentry::authority()
 }
 
 
-void CDentry::add_waiter(__u64 tag, Context *c)
+void CDentry::add_waiter(uint64_t tag, Context *c)
 {
   // wait on the directory?
   if (tag & (WAIT_UNFREEZE|WAIT_SINGLEAUTH)) {
index 3ef4b575ff2cefb2220751b54fe992a3bdee9561..5fb9e1285e3fbb63ebb553e22591b07d7e657412 100644 (file)
@@ -82,7 +82,7 @@ public:
   // -- wait --
   //static const int WAIT_LOCK_OFFSET = 8;
 
-  void add_waiter(__u64 tag, Context *c);
+  void add_waiter(uint64_t tag, Context *c);
 
   static const int EXPORT_NONCE = 1;
 
index 924eb915ce6068193b3c2b13615ba254f34b2888..d5ad15fb3046709c370ba8720d2db4c9cc319022 100644 (file)
@@ -851,7 +851,7 @@ void CDir::take_sub_waiting(list<Context*>& ls)
 
 
 
-void CDir::add_waiter(__u64 tag, Context *c) 
+void CDir::add_waiter(uint64_t tag, Context *c) 
 {
   // hierarchical?
 
@@ -882,7 +882,7 @@ void CDir::add_waiter(__u64 tag, Context *c)
 
 
 /* NOTE: this checks dentry waiters too */
-void CDir::take_waiting(__u64 mask, list<Context*>& ls)
+void CDir::take_waiting(uint64_t mask, list<Context*>& ls)
 {
   if ((mask & WAIT_DENTRY) && waiting_on_dentry.size()) {
     // take each each dentry waiter
@@ -902,7 +902,7 @@ void CDir::take_waiting(__u64 mask, list<Context*>& ls)
 }
 
 
-void CDir::finish_waiting(__u64 mask, int result) 
+void CDir::finish_waiting(uint64_t mask, int result) 
 {
   dout(11) << "finish_waiting mask " << hex << mask << dec << " result " << result << " on " << *this << dendl;
 
index 0cfe2a28f6cedccd117d32863d8900c1fbbbbb1e..657a9e2dc03c8379bd76b7febbd57b907d36c4e9 100644 (file)
@@ -135,15 +135,15 @@ public:
 
 
   // -- wait masks --
-  static const __u64 WAIT_DENTRY       = (1<<0);  // wait for item to be in cache
-  static const __u64 WAIT_COMPLETE     = (1<<1);  // wait for complete dir contents
-  static const __u64 WAIT_FROZEN       = (1<<2);  // auth pins removed
+  static const uint64_t WAIT_DENTRY       = (1<<0);  // wait for item to be in cache
+  static const uint64_t WAIT_COMPLETE     = (1<<1);  // wait for complete dir contents
+  static const uint64_t WAIT_FROZEN       = (1<<2);  // auth pins removed
 
   static const int WAIT_DNLOCK_OFFSET = 4;
 
-  static const __u64 WAIT_ANY_MASK  = (0xffffffff);
-  static const __u64 WAIT_ATFREEZEROOT = (WAIT_UNFREEZE);
-  static const __u64 WAIT_ATSUBTREEROOT = (WAIT_SINGLEAUTH);
+  static const uint64_t WAIT_ANY_MASK  = (0xffffffff);
+  static const uint64_t WAIT_ATFREEZEROOT = (WAIT_UNFREEZE);
+  static const uint64_t WAIT_ATSUBTREEROOT = (WAIT_SINGLEAUTH);
 
 
 
@@ -494,9 +494,9 @@ public:
 
   void take_sub_waiting(list<Context*>& ls);  // dentry or ino
 
-  void add_waiter(__u64 mask, Context *c);
-  void take_waiting(__u64 mask, list<Context*>& ls);  // may include dentry waiters
-  void finish_waiting(__u64 mask, int result = 0);    // ditto
+  void add_waiter(uint64_t mask, Context *c);
+  void take_waiting(uint64_t mask, list<Context*>& ls);  // may include dentry waiters
+  void finish_waiting(uint64_t mask, int result = 0);    // ditto
   
 
   // -- import/export --
index c077663e0502300366044072f659a800cad9d71a..369c76e3cf69756b2a2bc01b60b13bf8b9a457c0 100644 (file)
@@ -791,7 +791,7 @@ void CInode::encode_parent_mutation(ObjectOperation& m)
   CDentry *pdn = get_parent_dn();
   if (pdn) {
     bufferlist parent(32 + pdn->name.length());
-    __u64 ino = pdn->get_dir()->get_inode()->ino();
+    uint64_t ino = pdn->get_dir()->get_inode()->ino();
     __u8 v = 1;
     ::encode(v, parent);
     ::encode(inode.version, parent);
@@ -1317,7 +1317,7 @@ bool CInode::is_freezing()
   return false;
 }
 
-void CInode::add_waiter(__u64 tag, Context *c) 
+void CInode::add_waiter(uint64_t tag, Context *c) 
 {
   dout(10) << "add_waiter tag " << tag 
           << " !ambig " << !state_test(STATE_AMBIGUOUSAUTH)
@@ -1827,8 +1827,8 @@ void CInode::encode_cap_message(MClientCaps *m, Capability *cap)
   m->head.time_warp_seq = i->time_warp_seq;
 
   // max_size is min of projected, actual.
-  __u64 oldms = oi->client_ranges.count(client) ? oi->client_ranges[client].last : 0;
-  __u64 newms = pi->client_ranges.count(client) ? pi->client_ranges[client].last : 0;
+  uint64_t oldms = oi->client_ranges.count(client) ? oi->client_ranges[client].last : 0;
+  uint64_t newms = pi->client_ranges.count(client) ? pi->client_ranges[client].last : 0;
   m->head.max_size = MIN(oldms, newms);
 
   i = pauth ? pi:oi;
index 7b1cb93ebd84080d8ef501b84795719181dfbc07..0afa84fd7e6b8554c527b729968f02b2346564d2 100644 (file)
@@ -129,13 +129,13 @@ public:
   static const int STATE_DIRTYPARENT =  (1<<14);
 
   // -- waiters --
-  static const __u64 WAIT_DIR         = (1<<0);
-  static const __u64 WAIT_ANCHORED    = (1<<1);
-  static const __u64 WAIT_UNANCHORED  = (1<<2);
-  static const __u64 WAIT_FROZEN      = (1<<3);
-  static const __u64 WAIT_TRUNC       = (1<<4);
+  static const uint64_t WAIT_DIR         = (1<<0);
+  static const uint64_t WAIT_ANCHORED    = (1<<1);
+  static const uint64_t WAIT_UNANCHORED  = (1<<2);
+  static const uint64_t WAIT_FROZEN      = (1<<3);
+  static const uint64_t WAIT_TRUNC       = (1<<4);
   
-  static const __u64 WAIT_ANY_MASK     = (__u64)(-1);
+  static const uint64_t WAIT_ANY_MASK  = (uint64_t)(-1);
 
   // misc
   static const int EXPORT_NONCE = 1; // nonce given to replicas created by export
@@ -462,7 +462,7 @@ private:
 
 
   // -- waiting --
-  void add_waiter(__u64 tag, Context *c);
+  void add_waiter(uint64_t tag, Context *c);
 
 
   // -- encode/decode helpers --
index 80928458a91a82c9e95dc6da64b1bd73e640aca9..bec9d9e1fc81495555ccc83d9f8786d977cc76f7 100644 (file)
@@ -104,7 +104,7 @@ private:
   CInode *inode;
   client_t client;
 
-  __u64 cap_id;
+  uint64_t cap_id;
 
   __u32 _wanted;     // what the client wants (ideally)
 
@@ -228,7 +228,7 @@ public:
   xlist<Capability*>::item item_session_caps;
   xlist<Capability*>::item item_snaprealm_caps;
 
-  Capability(CInode *i, __u64 id, client_t c) : 
+  Capability(CInode *i, uint64_t id, client_t c) : 
     inode(i), client(c),
     cap_id(id),
     _wanted(0),
@@ -254,8 +254,8 @@ public:
   void set_last_issue() { last_issue = last_sent; }
   void set_last_issue_stamp(utime_t t) { last_issue_stamp = t; }
 
-  void set_cap_id(__u64 i) { cap_id = i; }
-  __u64 get_cap_id() { return cap_id; }
+  void set_cap_id(uint64_t i) { cap_id = i; }
+  uint64_t get_cap_id() { return cap_id; }
 
   //ceph_seq_t get_last_issue() { return last_issue; }
 
index b38d02fc8ef022ba33b9701716233951ee5d4ebd..5bbf4445739bd0ac2713891b897ea0e2060a5cc9 100644 (file)
@@ -1449,10 +1449,10 @@ public:
 };
 
 
-void Locker::calc_new_client_ranges(CInode *in, __u64 size, map<client_t,byte_range_t>& new_ranges)
+void Locker::calc_new_client_ranges(CInode *in, uint64_t size, map<client_t,byte_range_t>& new_ranges)
 {
   inode_t *latest = in->get_projected_inode();
-  __u64 ms = ROUND_UP_TO((size+1)<<1, latest->get_layout_size_increment());
+  uint64_t ms = ROUND_UP_TO((size+1)<<1, latest->get_layout_size_increment());
 
   // increase ranges as appropriate.
   // shrink to 0 if no WR|BUFFER caps issued.
@@ -1462,7 +1462,7 @@ void Locker::calc_new_client_ranges(CInode *in, __u64 size, map<client_t,byte_ra
     if ((p->second->issued() | p->second->wanted()) & (CEPH_CAP_FILE_WR|CEPH_CAP_FILE_BUFFER)) {
       new_ranges[p->first].first = 0;
       if (latest->client_ranges.count(p->first)) {
-       __u64 last = latest->client_ranges[p->first].last;
+       uint64_t last = latest->client_ranges[p->first].last;
        new_ranges[p->first].last = MAX(ms, last);
       } else
        new_ranges[p->first].last = ms;
@@ -1472,13 +1472,13 @@ void Locker::calc_new_client_ranges(CInode *in, __u64 size, map<client_t,byte_ra
 }
 
 bool Locker::check_inode_max_size(CInode *in, bool force_wrlock,
-                                 bool update_size, __u64 new_size, utime_t new_mtime)
+                                 bool update_size, uint64_t new_size, utime_t new_mtime)
 {
   assert(in->is_auth());
 
   inode_t *latest = in->get_projected_inode();
   map<client_t,byte_range_t> new_ranges;
-  __u64 size = latest->size;
+  uint64_t size = latest->size;
   if (update_size)
     size = new_size;
   bool new_max = false;
@@ -1815,7 +1815,7 @@ void Locker::handle_client_caps(MClientCaps *m)
 }
 
 void Locker::process_cap_update(MDRequest *mdr, client_t client,
-                               inodeno_t ino, __u64 cap_id, int caps, int wanted,
+                               inodeno_t ino, uint64_t cap_id, int caps, int wanted,
                                int seq, int issue_seq, int mseq,
                                const nstring& dname)
 {
@@ -1877,7 +1877,7 @@ void Locker::kick_cap_releases(MDRequest *mdr)
 }
 
 
-static __u64 calc_bounding(__u64 t)
+static uint64_t calc_bounding(uint64_t t)
 {
   t |= t >> 1;
   t |= t >> 2;
@@ -1906,7 +1906,7 @@ bool Locker::_do_cap_update(CInode *in, Capability *cap,
   inode_t *latest = in->get_projected_inode();
 
   // increase or zero max_size?
-  __u64 size = m->get_size();
+  uint64_t size = m->get_size();
   bool change_max = false;
   uint64_t old_max = latest->client_ranges.count(client) ? latest->client_ranges[client].last : 0;
   uint64_t new_max = old_max;
@@ -2088,7 +2088,7 @@ void Locker::handle_client_cap_release(MClientCapRelease *m)
   dout(10) << "handle_client_cap_release " << *m << dendl;
 
   for (vector<ceph_mds_cap_item>::iterator p = m->caps.begin(); p != m->caps.end(); p++) {
-    inodeno_t ino((__u64)p->ino);
+    inodeno_t ino((uint64_t)p->ino);
     CInode *in = mdcache->get_inode(ino);
     if (!in) {
       dout(10) << " missing ino " << ino << dendl;
index d77cbf62fbfcb6046c4e01e777971fd9d8a65c43..1cb33eeb3e1351bc55e501924092fef5d0318d07 100644 (file)
@@ -169,7 +169,7 @@ public:
 
   // caps
   void process_cap_update(MDRequest *mdr, client_t client,
-                         inodeno_t ino, __u64 cap_id, int caps, int wanted,
+                         inodeno_t ino, uint64_t cap_id, int caps, int wanted,
                          int seq, int issue_seq, int mseq,
                          const nstring& dname);
   void kick_cap_releases(MDRequest *mdr);
@@ -226,8 +226,8 @@ protected:
   void file_update_finish(CInode *in, Mutation *mut, bool share, client_t client, Capability *cap,
                          MClientCaps *ack);
 public:
-  void calc_new_client_ranges(CInode *in, __u64 size, map<client_t,byte_range_t>& new_ranges);
-  bool check_inode_max_size(CInode *in, bool force_wrlock=false, bool update_size=false, __u64 newsize=0,
+  void calc_new_client_ranges(CInode *in, uint64_t size, map<client_t,byte_range_t>& new_ranges);
+  bool check_inode_max_size(CInode *in, bool force_wrlock=false, bool update_size=false, uint64_t newsize=0,
                            utime_t mtime=utime_t());
   void share_inode_max_size(CInode *in);
 
index 4307e01cf1e09f0c92500a538250191736d9e76c..82b21f2338c609c3e855b9ea28b7487056a7cc39 100644 (file)
@@ -4502,7 +4502,7 @@ void MDCache::start_files_to_recover(vector<CInode*>& recover_q, vector<CInode*>
 struct C_MDC_Recover : public Context {
   MDCache *mdc;
   CInode *in;
-  __u64 size;
+  uint64_t size;
   utime_t mtime;
   C_MDC_Recover(MDCache *m, CInode *i) : mdc(m), in(i), size(0) {}
   void finish(int r) {
@@ -4551,7 +4551,7 @@ void MDCache::do_file_recover()
   }
 }
 
-void MDCache::_recovered(CInode *in, int r, __u64 size, utime_t mtime)
+void MDCache::_recovered(CInode *in, int r, uint64_t size, utime_t mtime)
 {
   dout(10) << "_recovered r=" << r << " size=" << in->inode.size << " mtime=" << in->inode.mtime
           << " for " << *in << dendl;
@@ -7024,10 +7024,10 @@ void MDCache::purge_stray(CDentry *dn)
     assert(in->last == CEPH_NOSNAP);
   }
 
-  __u64 period = in->inode.layout.fl_object_size * in->inode.layout.fl_stripe_count;
-  __u64 cur_max_size = in->inode.get_max_size();
-  __u64 to = MAX(in->inode.size, cur_max_size);
-  __u64 num = (to + period - 1) / period;
+  uint64_t period = in->inode.layout.fl_object_size * in->inode.layout.fl_stripe_count;
+  uint64_t cur_max_size = in->inode.get_max_size();
+  uint64_t to = MAX(in->inode.size, cur_max_size);
+  uint64_t num = (to + period - 1) / period;
   dout(10) << "purge_stray 0~" << to << " objects 0~" << num << " snapc " << snapc << " on " << *in << dendl;
   if (to)
     mds->filer->purge_range(in->inode.ino, &in->inode.layout, *snapc,
index 625a8be48f0a1a7826366bf02d4ec3c8129a2385..8c641425ecc2b52196646fdd2eeaad8b2d904e76 100644 (file)
@@ -305,7 +305,7 @@ struct MDRequest : public Mutation {
     bool was_link_merge;
 
     map<client_t,entity_inst_t> imported_client_map;
-    map<client_t,__u64> sseq_map;
+    map<client_t,uint64_t> sseq_map;
     map<CInode*, map<client_t,Capability::Export> > cap_imports;
     
     // for snaps
@@ -469,7 +469,7 @@ public:
   }
 
   // -- client caps --
-  __u64              last_cap_id;
+  uint64_t              last_cap_id;
   
   void remove_client_cap(CInode *in, client_t client);
 
@@ -723,7 +723,7 @@ public:
   void rejoin_recovered_caps(inodeno_t ino, client_t client, cap_reconnect_t& icr, 
                             int frommds=-1) {
     cap_imports[ino][client][frommds] = icr.capinfo;
-    cap_import_paths[ino] = filepath(icr.path, (__u64)icr.capinfo.pathbase);
+    cap_import_paths[ino] = filepath(icr.path, (uint64_t)icr.capinfo.pathbase);
   }
   ceph_mds_cap_reconnect *get_replay_cap_reconnect(inodeno_t ino, client_t client) {
     if (cap_imports.count(ino) &&
@@ -789,7 +789,7 @@ public:
   void start_files_to_recover(vector<CInode*>& recover_q, vector<CInode*>& check_q);
 
   void do_file_recover();
-  void _recovered(CInode *in, int r, __u64 size, utime_t mtime);
+  void _recovered(CInode *in, int r, uint64_t size, utime_t mtime);
 
   void purge_prealloc_ino(inodeno_t ino, Context *fin);
 
index 14dbb6c2ce2e3c940ddc5174c07f2b9217868c3e..a53ac62154eb6634b16e55be2aa8b0abe3efd269 100644 (file)
@@ -163,7 +163,7 @@ public:
     return segments.empty() ? 0:segments.rbegin()->second; 
   }
 
-  LogSegment *get_segment(__u64 off) {
+  LogSegment *get_segment(uint64_t off) {
     if (segments.count(off))
       return segments[off];
     return NULL;
index 4695010460c75f6d4a509f9c7dd92a5706a510f7..9884d1ba1f7f6b2c8f56f16ab31cd8ab6c5d5f3f 100644 (file)
@@ -74,13 +74,13 @@ void MDSMap::print(ostream& out)
       << "failed <" << failed << ">\n"
       << "stopped <" << stopped << ">\n";
 
-  multimap< pair<unsigned,unsigned>, __u64 > foo;
-  for (map<__u64,mds_info_t>::iterator p = mds_info.begin();
+  multimap< pair<unsigned,unsigned>, uint64_t > foo;
+  for (map<uint64_t,mds_info_t>::iterator p = mds_info.begin();
        p != mds_info.end();
        p++)
-    foo.insert(pair<pair<unsigned,unsigned>,__u64>(pair<unsigned,unsigned>(p->second.rank, p->second.inc-1), p->first));
+    foo.insert(pair<pair<unsigned,unsigned>,uint64_t>(pair<unsigned,unsigned>(p->second.rank, p->second.inc-1), p->first));
 
-  for (multimap< pair<unsigned,unsigned>, __u64 >::iterator p = foo.begin();
+  for (multimap< pair<unsigned,unsigned>, uint64_t >::iterator p = foo.begin();
        p != foo.end();
        p++) {
     mds_info_t& info = mds_info[p->second];
@@ -115,7 +115,7 @@ void MDSMap::print(ostream& out)
 void MDSMap::print_summary(ostream& out) 
 {
   map<string,int> by_state;
-  for (map<__u64,mds_info_t>::iterator p = mds_info.begin();
+  for (map<uint64_t,mds_info_t>::iterator p = mds_info.begin();
        p != mds_info.end();
        p++) {
     string s = ceph_mds_state_name(p->second.state);
index 43bddee0f76b5ae8db553695292d7ac718f86621..a26472feaed04fbef504ca57992be94f13e15957 100644 (file)
@@ -84,7 +84,7 @@ public:
   static const int STATE_STOPPING  =  CEPH_MDS_STATE_STOPPING; // up, exporting metadata (-> standby or out)
   
   struct mds_info_t {
-    __u64 global_id;
+    uint64_t global_id;
     string name;
     int32_t rank;
     int32_t inc;
@@ -149,7 +149,7 @@ protected:
 
   __u32 session_timeout;
   __u32 session_autoclose;
-  __u64 max_file_size;
+  uint64_t max_file_size;
 
   vector<__u32> data_pg_pools;  // file data pg_pools available to clients (via an ioctl).  first is the default.
   __u32 cas_pg_pool;            // where CAS objects go
@@ -169,8 +169,8 @@ protected:
   set<int32_t> in;              // currently defined cluster
   map<int32_t,int32_t> inc;     // most recent incarnation.
   set<int32_t> failed, stopped; // which roles are failed or stopped
-  map<int32_t,__u64> up;        // who is in those roles
-  map<__u64,mds_info_t> mds_info;
+  map<int32_t,uint64_t> up;        // who is in those roles
+  map<uint64_t,mds_info_t> mds_info;
 
 public:
   CompatSet compat;
@@ -189,7 +189,7 @@ public:
   utime_t get_session_timeout() {
     return utime_t(session_timeout,0);
   }
-  __u64 get_max_filesize() { return max_file_size; }
+  uint64_t get_max_filesize() { return max_file_size; }
   
   epoch_t get_epoch() const { return epoch; }
   void inc_epoch() { epoch++; }
@@ -212,8 +212,8 @@ public:
   __u32 get_cas_pg_pool() const { return cas_pg_pool; }
   __u32 get_metadata_pg_pool() const { return metadata_pg_pool; }
 
-  const map<__u64,mds_info_t>& get_mds_info() { return mds_info; }
-  const mds_info_t& get_mds_info_gid(__u64 gid) {
+  const map<uint64_t,mds_info_t>& get_mds_info() { return mds_info; }
+  const mds_info_t& get_mds_info_gid(uint64_t gid) {
     assert(mds_info.count(gid));
     return mds_info[gid];
   }
@@ -228,7 +228,7 @@ public:
   }
   unsigned get_num_mds(int state) {
     unsigned n = 0;
-    for (map<__u64,mds_info_t>::const_iterator p = mds_info.begin();
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
         p != mds_info.end();
         ++p)
       if (p->second.state == state) ++n;
@@ -242,7 +242,7 @@ public:
     s = in;
   }
   void get_up_mds_set(set<int>& s) {
-    for (map<int32_t,__u64>::const_iterator p = up.begin();
+    for (map<int32_t,uint64_t>::const_iterator p = up.begin();
         p != up.end();
         ++p)
       s.insert(p->first);
@@ -262,14 +262,14 @@ public:
   }
   void get_recovery_mds_set(set<int>& s) {
     s = failed;
-    for (map<__u64,mds_info_t>::const_iterator p = mds_info.begin();
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
         p != mds_info.end();
         ++p)
       if (p->second.state >= STATE_REPLAY && p->second.state <= STATE_STOPPING)
        s.insert(p->second.rank);
   }
   void get_mds_set(set<int>& s, int state) {
-    for (map<__u64,mds_info_t>::const_iterator p = mds_info.begin();
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
         p != mds_info.end();
         ++p)
       if (p->second.state == state)
@@ -279,14 +279,14 @@ public:
   int get_random_up_mds() {
     if (up.empty())
       return -1;
-    map<int32_t,__u64>::iterator p = up.begin();
+    map<int32_t,uint64_t>::iterator p = up.begin();
     for (int n = rand() % up.size(); n; n--)
       p++;
     return p->first;
   }
 
-  __u64 find_standby_for(int mds, string& name) {
-    for (map<__u64,mds_info_t>::const_iterator p = mds_info.begin();
+  uint64_t find_standby_for(int mds, string& name) {
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
         p != mds_info.end();
         ++p) {
       if (p->second.rank == -1 &&
@@ -297,7 +297,7 @@ public:
        return p->first;
       }
     }
-    for (map<__u64,mds_info_t>::const_iterator p = mds_info.begin();
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
         p != mds_info.end();
         ++p) {
       if (p->second.rank == -1 &&
@@ -321,13 +321,13 @@ public:
   bool is_stopped(int m)    { return stopped.count(m); }
 
   bool is_dne(int m)      { return in.count(m) == 0; }
-  bool is_dne_gid(__u64 gid)      { return mds_info.count(gid) == 0; }
+  bool is_dne_gid(uint64_t gid)      { return mds_info.count(gid) == 0; }
 
   int get_state(int m) { return up.count(m) ? mds_info[up[m]].state : 0; }
-  int get_state_gid(__u64 gid) { return mds_info.count(gid) ? mds_info[gid].state : 0; }
+  int get_state_gid(uint64_t gid) { return mds_info.count(gid) ? mds_info[gid].state : 0; }
 
   mds_info_t& get_info(int m) { assert(up.count(m)); return mds_info[up[m]]; }
-  mds_info_t& get_info_gid(__u64 gid) { assert(mds_info.count(gid)); return mds_info[gid]; }
+  mds_info_t& get_info_gid(uint64_t gid) { assert(mds_info.count(gid)); return mds_info[gid]; }
 
   bool is_boot(int m)  { return get_state(m) == STATE_BOOT; }
   bool is_creating(int m) { return get_state(m) == STATE_CREATING; }
@@ -341,7 +341,7 @@ public:
   bool is_stopping(int m) { return get_state(m) == STATE_STOPPING; }
   bool is_clientreplay_or_active_or_stopping(int m)   { return is_clientreplay(m) || is_active(m) || is_stopping(m); }
 
-  bool is_laggy_gid(__u64 gid) { return mds_info.count(gid) && mds_info[gid].laggy(); }
+  bool is_laggy_gid(uint64_t gid) { return mds_info.count(gid) && mds_info[gid].laggy(); }
 
 
   // cluster states
@@ -389,7 +389,7 @@ public:
     return false;
   }
   
-  int get_rank_gid(__u64 gid) {
+  int get_rank_gid(uint64_t gid) {
     if (mds_info.count(gid))
       return mds_info[gid].rank;
     return -1;
index 05c7944f4d1bab8298b999dbe1f2f0a9955857b3..4736b9876ec86d2136cea1f68ed18a1878f95040 100644 (file)
@@ -43,7 +43,7 @@ void MDSTableClient::handle_request(class MMDSTableRequest *m)
   assert(m->table == table);
 
   version_t tid = m->get_tid();
-  __u64 reqid = m->reqid;
+  uint64_t reqid = m->reqid;
 
   switch (m->op) {
   case TABLESERVER_OP_QUERY_REPLY:
@@ -133,7 +133,7 @@ void MDSTableClient::_logged_ack(version_t tid)
 void MDSTableClient::_prepare(bufferlist& mutation, version_t *ptid, bufferlist *pbl,
                              Context *onfinish)
 {
-  __u64 reqid = ++last_reqid;
+  uint64_t reqid = ++last_reqid;
   dout(10) << "_prepare " << reqid << dendl;
 
   // send message
@@ -209,7 +209,7 @@ void MDSTableClient::handle_mds_recovery(int who)
   resend_queries();
   
   // prepares.
-  for (map<__u64, _pending_prepare>::iterator p = pending_prepare.begin();
+  for (map<uint64_t, _pending_prepare>::iterator p = pending_prepare.begin();
        p != pending_prepare.end();
        p++) {
     dout(10) << "resending " << p->first << dendl;
index dbbd509395d132192ab488c1a1909b6dcd40b9ad..3e5ba242b98bb4240818718935c5f4c986c895e0 100644 (file)
@@ -28,7 +28,7 @@ protected:
   MDS *mds;
   int table;
 
-  __u64 last_reqid;
+  uint64_t last_reqid;
 
   // prepares
   struct _pending_prepare {
@@ -40,7 +40,7 @@ protected:
     _pending_prepare() : onfinish(0), ptid(0), pbl(0) {}
   };
 
-  map<__u64, _pending_prepare> pending_prepare;
+  map<uint64_t, _pending_prepare> pending_prepare;
 
   // pending commits
   map<version_t, LogSegment*> pending_commit;
index e913fb2f08f211b666440da8084306ab13fd5a50..0a3d2d43ae9e1307dbec9e8af909dcb0175aac1f 100644 (file)
@@ -27,7 +27,7 @@ public:
    * pending mutation state in the table.
    */
   struct _pending {
-    __u64 reqid;
+    uint64_t reqid;
     __s32 mds;
     version_t tid;
     void encode(bufferlist& bl) const {
@@ -77,20 +77,20 @@ private:
 
  public:
   virtual void handle_query(MMDSTableRequest *m) = 0;
-  virtual void _prepare(bufferlist &bl, __u64 reqid, int bymds) = 0;
+  virtual void _prepare(bufferlist &bl, uint64_t reqid, int bymds) = 0;
   virtual void _commit(version_t tid) = 0;
   virtual void _rollback(version_t tid) = 0;
   virtual void _server_update(bufferlist& bl) { assert(0); }
 
-  void _note_prepare(int mds, __u64 reqid) {
+  void _note_prepare(int mds, uint64_t reqid) {
     pending_for_mds[version].mds = mds;
     pending_for_mds[version].reqid = reqid;
     pending_for_mds[version].tid = version;
   }
-  void _note_commit(__u64 tid) {
+  void _note_commit(uint64_t tid) {
     pending_for_mds.erase(tid);
   }
-  void _note_rollback(__u64 tid) {
+  void _note_rollback(uint64_t tid) {
     pending_for_mds.erase(tid);
   }
   
index 1020894d52e5295f5ab5f6488a25dc31adb9a25e..b56e9eb699864d3078cd8bcbc377579f619d5675 100644 (file)
@@ -1648,7 +1648,7 @@ class C_MDS_ImportDirLoggedStart : public Context {
   int from;
 public:
   map<client_t,entity_inst_t> imported_client_map;
-  map<client_t,__u64> sseqmap;
+  map<client_t,uint64_t> sseqmap;
 
   C_MDS_ImportDirLoggedStart(Migrator *m, CDir *d, int f) :
     migrator(m), dir(d), from(f) {
@@ -1912,7 +1912,7 @@ void Migrator::import_reverse_final(CDir *dir)
 
 void Migrator::import_logged_start(CDir *dir, int from,
                                   map<client_t,entity_inst_t>& imported_client_map,
-                                  map<client_t,__u64>& sseqmap)
+                                  map<client_t,uint64_t>& sseqmap)
 {
   dout(7) << "import_logged " << *dir << dendl;
 
@@ -2310,7 +2310,7 @@ class C_M_LoggedImportCaps : public Context {
 public:
   map<CInode*, map<client_t,Capability::Export> > cap_imports;
   map<client_t,entity_inst_t> client_map;
-  map<client_t,__u64> sseqmap;
+  map<client_t,uint64_t> sseqmap;
 
   C_M_LoggedImportCaps(Migrator *m, CInode *i, int f) : migrator(m), in(i), from(f) {}
   void finish(int r) {
@@ -2356,7 +2356,7 @@ void Migrator::logged_import_caps(CInode *in,
                                  int from,
                                  map<CInode*, map<client_t,Capability::Export> >& cap_imports,
                                  map<client_t,entity_inst_t>& client_map,
-                                 map<client_t,__u64>& sseqmap) 
+                                 map<client_t,uint64_t>& sseqmap) 
 {
   dout(10) << "logged_import_caps on " << *in << dendl;
 
index 5d6df53bcc2a470bcc45a4d0148fba880a191251..d39a96fdd20b9625856437265c0a6aa3b062cd1a 100644 (file)
@@ -253,7 +253,7 @@ protected:
   void import_notify_abort(CDir *dir, set<CDir*>& bounds);
   void import_logged_start(CDir *dir, int from,
                           map<client_t,entity_inst_t> &imported_client_map,
-                          map<client_t,__u64>& sseqmap);
+                          map<client_t,uint64_t>& sseqmap);
   void handle_export_finish(MExportDirFinish *m);
 public:
   void import_finish(CDir *dir);
@@ -264,7 +264,7 @@ protected:
                          int from,
                          map<CInode*, map<client_t,Capability::Export> >& cap_imports,
                          map<client_t,entity_inst_t>& client_map,
-                         map<client_t,__u64>& sseqmap);
+                         map<client_t,uint64_t>& sseqmap);
 
 
   friend class C_MDS_ImportDirLoggedStart;
index cf941f14a5be6ed828664ebd1c12b99714e4664a..c62dc8c614500800ae8785c2407768e972bd1b60 100644 (file)
@@ -144,15 +144,15 @@ void Server::dispatch(Message *m)
 class C_MDS_session_finish : public Context {
   MDS *mds;
   Session *session;
-  __u64 state_seq;
+  uint64_t state_seq;
   bool open;
   version_t cmapv;
   interval_set<inodeno_t> inos;
   version_t inotablev;
 public:
-  C_MDS_session_finish(MDS *m, Session *se, __u64 sseq, bool s, version_t mv) :
+  C_MDS_session_finish(MDS *m, Session *se, uint64_t sseq, bool s, version_t mv) :
     mds(m), session(se), state_seq(sseq), open(s), cmapv(mv), inotablev(0) { }
-  C_MDS_session_finish(MDS *m, Session *se, __u64 sseq, bool s, version_t mv, interval_set<inodeno_t>& i, version_t iv) :
+  C_MDS_session_finish(MDS *m, Session *se, uint64_t sseq, bool s, version_t mv, interval_set<inodeno_t>& i, version_t iv) :
     mds(m), session(se), state_seq(sseq), open(s), cmapv(mv), inos(i), inotablev(iv) { }
   void finish(int r) {
     assert(r == 0);
@@ -186,7 +186,7 @@ void Server::handle_client_session(MClientSession *m)
     return;
   }
 
-  __u64 sseq = 0;
+  uint64_t sseq = 0;
   switch (m->get_op()) {
   case CEPH_SESSION_REQUEST_OPEN:
     if (session->is_opening() ||
@@ -268,7 +268,7 @@ void Server::handle_client_session(MClientSession *m)
   }
 }
 
-void Server::_session_logged(Session *session, __u64 state_seq, bool open, version_t pv,
+void Server::_session_logged(Session *session, uint64_t state_seq, bool open, version_t pv,
                             interval_set<inodeno_t>& inos, version_t piv)
 {
   dout(10) << "_session_logged " << session->inst << " state_seq " << state_seq << " " << (open ? "open":"close")
@@ -328,7 +328,7 @@ void Server::_session_logged(Session *session, __u64 state_seq, bool open, versi
 }
 
 version_t Server::prepare_force_open_sessions(map<client_t,entity_inst_t>& cm,
-                                             map<client_t,__u64>& sseqmap)
+                                             map<client_t,uint64_t>& sseqmap)
 {
   version_t pv = ++mds->sessionmap.projected;
   dout(10) << "prepare_force_open_sessions " << pv 
@@ -351,7 +351,7 @@ version_t Server::prepare_force_open_sessions(map<client_t,entity_inst_t>& cm,
 }
 
 void Server::finish_force_open_sessions(map<client_t,entity_inst_t>& cm,
-                                       map<client_t,__u64>& sseqmap)
+                                       map<client_t,uint64_t>& sseqmap)
 {
   /*
    * FIXME: need to carefully consider the race conditions between a
@@ -365,7 +365,7 @@ void Server::finish_force_open_sessions(map<client_t,entity_inst_t>& cm,
     assert(session);
     
     if (sseqmap.count(p->first)) {
-      __u64 sseq = sseqmap[p->first];
+      uint64_t sseq = sseqmap[p->first];
       if (session->get_state_seq() != sseq) {
        dout(10) << "force_open_sessions skipping changed " << session->inst << dendl;
       } else {
@@ -398,7 +398,7 @@ void Server::terminate_sessions()
        session->is_killing() ||
        session->is_closed())
       continue;
-    __u64 sseq = mds->sessionmap.set_state(session, Session::STATE_CLOSING);
+    uint64_t sseq = mds->sessionmap.set_state(session, Session::STATE_CLOSING);
     version_t pv = ++mds->sessionmap.projected;
     mdlog->start_submit_entry(new ESession(session->inst, false, pv),
                              new C_MDS_session_finish(mds, session, sseq, false, pv));
@@ -478,7 +478,7 @@ void Server::kill_session(Session *session)
        session->is_stale()) &&
       !session->is_importing()) {
     dout(10) << "kill_session " << session << dendl;
-    __u64 sseq = mds->sessionmap.set_state(session, Session::STATE_KILLING);
+    uint64_t sseq = mds->sessionmap.set_state(session, Session::STATE_KILLING);
     version_t pv = ++mds->sessionmap.projected;
     mdlog->start_submit_entry(new ESession(session->inst, false, pv),
                              new C_MDS_session_finish(mds, session, sseq, false, pv));
@@ -543,7 +543,7 @@ void Server::handle_client_reconnect(MClientReconnect *m)
     dout(7) << " client had no session, removing from session map" << dendl;
     assert(session);  // ?
     version_t pv = ++mds->sessionmap.projected;
-    __u64 sseq = session->get_state_seq();
+    uint64_t sseq = session->get_state_seq();
     mdlog->start_submit_entry(new ESession(session->inst, false, pv),
                              new C_MDS_session_finish(mds, session, sseq, false, pv));
     mdlog->flush();
@@ -557,7 +557,7 @@ void Server::handle_client_reconnect(MClientReconnect *m)
               << m->get_source_inst() << dendl;
       mds->sessionmap.set_state(session, Session::STATE_OPENING);
       version_t pv = ++mds->sessionmap.projected;
-      __u64 sseq = session->get_state_seq();
+      uint64_t sseq = session->get_state_seq();
       mdlog->start_submit_entry(new ESession(session->inst, true, pv),
                                new C_MDS_session_finish(mds, session, sseq, true, pv));
       mdlog->flush();
@@ -610,7 +610,7 @@ void Server::handle_client_reconnect(MClientReconnect *m)
        continue;
       }
       
-      filepath path(p->second.path, (__u64)p->second.capinfo.pathbase);
+      filepath path(p->second.path, (uint64_t)p->second.capinfo.pathbase);
       if ((in && !in->is_auth()) ||
          !mds->mdcache->path_is_mine(path)) {
        // not mine.
@@ -1065,7 +1065,7 @@ void Server::handle_client_request(MClientRequest *req)
         p != req->releases.end();
         p++)
       mds->locker->process_cap_update(mdr, client,
-                                     inodeno_t((__u64)p->item.ino), p->item.cap_id,
+                                     inodeno_t((uint64_t)p->item.ino), p->item.cap_id,
                                      p->item.caps, p->item.wanted,
                                      p->item.seq, 
                                      p->item.issue_seq, 
@@ -2543,7 +2543,7 @@ void Server::handle_client_setattr(MDRequest *mdr)
   // trunc from bigger -> smaller?
   inode_t *pi = cur->get_projected_inode();
 
-  __u64 old_size = MAX(pi->size, req->head.args.setattr.old_size);
+  uint64_t old_size = MAX(pi->size, req->head.args.setattr.old_size);
   bool truncating_smaller = false;
   if (mask & CEPH_SETATTR_SIZE) {
     truncating_smaller = req->head.args.setattr.size < old_size;
index bf2774824104a56ed84f5ceefb7e40058bbc0c99..7abfc3356ae5196f36ae12d2fb0b63882d788a89 100644 (file)
@@ -69,12 +69,12 @@ public:
 
   Session *get_session(Message *m);
   void handle_client_session(class MClientSession *m);
-  void _session_logged(Session *session, __u64 state_seq, 
+  void _session_logged(Session *session, uint64_t state_seq, 
                       bool open, version_t pv, interval_set<inodeno_t>& inos,version_t piv);
   version_t prepare_force_open_sessions(map<client_t,entity_inst_t> &cm,
-                                       map<client_t,__u64>& sseqmap);
+                                       map<client_t,uint64_t>& sseqmap);
   void finish_force_open_sessions(map<client_t,entity_inst_t> &cm,
-                                       map<client_t,__u64>& sseqmap);
+                                       map<client_t,uint64_t>& sseqmap);
   void terminate_sessions();
   void find_idle_sessions();
   void kill_session(Session *session);
index e77bbadd3567f7b0b69e53cde13e8945b62776af..51f12f3f156698364e059a524ac9a328eb626b9f 100644 (file)
@@ -145,7 +145,7 @@ void SessionMap::_save_finish(version_t v)
 
 void SessionMap::encode(bufferlist& bl)
 {
-  __u64 pre = -1;     // for 0.19 compatibility; we forgot an encoding prefix.
+  uint64_t pre = -1;     // for 0.19 compatibility; we forgot an encoding prefix.
   ::encode(pre, bl);
 
   __u8 struct_v = 2;
@@ -168,9 +168,9 @@ void SessionMap::encode(bufferlist& bl)
 void SessionMap::decode(bufferlist::iterator& p)
 {
   utime_t now = g_clock.now();
-  __u64 pre;
+  uint64_t pre;
   ::decode(pre, p);
-  if (pre == (__u64)-1) {
+  if (pre == (uint64_t)-1) {
     __u8 struct_v;
     ::decode(struct_v, p);
     assert(struct_v == 2);
index 05f4b69a194aa021e2ed770a4e8f5dc64e1c8f8e..73f968915f8e4db8d128a5dc97158d7d5099478c 100644 (file)
@@ -76,7 +76,7 @@ public:
 
 private:
   int state;
-  __u64 state_seq;
+  uint64_t state_seq;
   int importing_count;
   friend class SessionMap;
 public:
@@ -118,7 +118,7 @@ public:
 
   int get_state() { return state; }
   const char *get_state_name() { return get_state_name(state); }
-  __u64 get_state_seq() { return state_seq; }
+  uint64_t get_state_seq() { return state_seq; }
   bool is_closed() { return state == STATE_CLOSED; }
   bool is_opening() { return state == STATE_OPENING; }
   bool is_open() { return state == STATE_OPEN; }
@@ -280,7 +280,7 @@ public:
     if (by_state[state].empty()) return 0;
     return by_state[state].front();
   }
-  __u64 set_state(Session *session, int s) {
+  uint64_t set_state(Session *session, int s) {
     if (session->state != s) {
       session->state = s;
       session->state_seq++;
index 11352793b35f01b56e967657292f2dc0647c6e92..05f2224dced8b5f1bcf4c0541b9ee7ef3aeea466 100644 (file)
@@ -127,13 +127,13 @@ public:
 
 
   // waiting
-  static const __u64 WAIT_RD          = (1<<0);  // to read
-  static const __u64 WAIT_WR          = (1<<1);  // to write
-  static const __u64 WAIT_XLOCK       = (1<<2);  // to xlock   (** dup)
-  static const __u64 WAIT_STABLE      = (1<<2);  // for a stable state
-  static const __u64 WAIT_REMOTEXLOCK = (1<<3);  // for a remote xlock
+  static const uint64_t WAIT_RD          = (1<<0);  // to read
+  static const uint64_t WAIT_WR          = (1<<1);  // to write
+  static const uint64_t WAIT_XLOCK       = (1<<2);  // to xlock   (** dup)
+  static const uint64_t WAIT_STABLE      = (1<<2);  // for a stable state
+  static const uint64_t WAIT_REMOTEXLOCK = (1<<3);  // for a remote xlock
   static const int WAIT_BITS        = 4;
-  static const __u64 WAIT_ALL         = ((1<<WAIT_BITS)-1);
+  static const uint64_t WAIT_ALL         = ((1<<WAIT_BITS)-1);
 
 
 protected:
@@ -273,16 +273,16 @@ public:
   void encode_locked_state(bufferlist& bl) {
     parent->encode_lock_state(type->type, bl);
   }
-  void finish_waiters(__u64 mask, int r=0) {
+  void finish_waiters(uint64_t mask, int r=0) {
     parent->finish_waiting(mask << get_wait_shift(), r);
   }
-  void take_waiting(__u64 mask, list<Context*>& ls) {
+  void take_waiting(uint64_t mask, list<Context*>& ls) {
     parent->take_waiting(mask << get_wait_shift(), ls);
   }
-  void add_waiter(__u64 mask, Context *c) {
+  void add_waiter(uint64_t mask, Context *c) {
     parent->add_waiter(mask << get_wait_shift(), c);
   }
-  bool is_waiter_for(__u64 mask) {
+  bool is_waiter_for(uint64_t mask) {
     return parent->is_waiter_for(mask << get_wait_shift());
   }
   
index 0165f9161bae9408fd1fca6ba80aec2d6edc8fe8..e0c22b38c01e87b7408ece07714dac6cc99ac23b 100644 (file)
@@ -40,7 +40,7 @@ void SnapServer::reset_state()
 
 // SERVER
 
-void SnapServer::_prepare(bufferlist &bl, __u64 reqid, int bymds)
+void SnapServer::_prepare(bufferlist &bl, uint64_t reqid, int bymds)
 {
   bufferlist::iterator p = bl.begin();
   __u32 op;
index 8380786b8d69c43e201932a2919814e0c1a707fe..db5b6c964211aa676c370e0dfa728830765dd2c4 100644 (file)
@@ -61,7 +61,7 @@ public:
   }
 
   // server bits
-  void _prepare(bufferlist &bl, __u64 reqid, int bymds);
+  void _prepare(bufferlist &bl, uint64_t reqid, int bymds);
   bool _is_prepared(version_t tid);
   void _commit(version_t tid);
   void _rollback(version_t tid);
index 24a8d7b87d13f49d728464fc85ea4991140cb969..962ff8b9f8cc648ebbdc7f6397a56590a7e493a8 100644 (file)
@@ -351,12 +351,12 @@ private:
 
   // inodes i've truncated
   list<inodeno_t> truncate_start;        // start truncate 
-  map<inodeno_t,__u64> truncate_finish;  // finished truncate (started in segment blah)
+  map<inodeno_t,uint64_t> truncate_finish;  // finished truncate (started in segment blah)
 
   vector<inodeno_t> destroyed_inodes;
 
   // idempotent op(s)
-  list<pair<metareqid_t,__u64> > client_reqs;
+  list<pair<metareqid_t,uint64_t> > client_reqs;
 
  public:
   void encode(bufferlist& bl) const {
@@ -409,7 +409,7 @@ private:
       list<metareqid_t> r;
       ::decode(r, bl);
       while (!r.empty()) {
-       client_reqs.push_back(pair<metareqid_t,__u64>(r.front(), 0));
+       client_reqs.push_back(pair<metareqid_t,uint64_t>(r.front(), 0));
        r.pop_front();
       }
     }
@@ -436,8 +436,8 @@ private:
     }
   }
 
-  void add_client_req(metareqid_t r, __u64 tid=0) {
-    client_reqs.push_back(pair<metareqid_t,__u64>(r, tid));
+  void add_client_req(metareqid_t r, uint64_t tid=0) {
+    client_reqs.push_back(pair<metareqid_t,uint64_t>(r, tid));
   }
 
   void add_table_transaction(int table, version_t tid) {
@@ -465,7 +465,7 @@ private:
   void add_truncate_start(inodeno_t ino) {
     truncate_start.push_back(ino);
   }
-  void add_truncate_finish(inodeno_t ino, __u64 segoff) {
+  void add_truncate_finish(inodeno_t ino, uint64_t segoff) {
     truncate_finish[ino] = segoff;
   }
 
index 0f4998c75ec81610896ea2313f45243b7be9a24d..a479efe2a8699cc4fd34816fade7aff61c736bb3 100644 (file)
 struct ETableServer : public LogEvent {
   __u16 table;
   __s16 op;
-  __u64 reqid;
+  uint64_t reqid;
   __s32 bymds;
   bufferlist mutation;
   version_t tid;
   version_t version;
 
   ETableServer() : LogEvent(EVENT_TABLESERVER) { }
-  ETableServer(int t, int o, __u64 ri, int m, version_t ti, version_t v) :
+  ETableServer(int t, int o, uint64_t ri, int m, version_t ti, version_t v) :
     LogEvent(EVENT_TABLESERVER),
     table(t), op(o), reqid(ri), bymds(m), tid(ti), version(v) { }
 
index 6e6cc26689f4bb4fd22ec4c7c1d6ed9895ae8981..04767ea12c26d36d8ff771dd6d90cf8bbecea2ca 100644 (file)
@@ -648,7 +648,7 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg)
     assert(in);
     mds->mdcache->add_recovered_truncate(in, logseg);
   }
-  for (map<inodeno_t,__u64>::iterator p = truncate_finish.begin();
+  for (map<inodeno_t,uint64_t>::iterator p = truncate_finish.begin();
        p != truncate_finish.end();
        p++) {
     LogSegment *ls = mds->mdlog->get_segment(p->second);
@@ -673,7 +673,7 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg)
   }
 
   // client requests
-  for (list<pair<metareqid_t, __u64> >::iterator p = client_reqs.begin();
+  for (list<pair<metareqid_t, uint64_t> >::iterator p = client_reqs.begin();
        p != client_reqs.end();
        ++p)
     if (p->first.name.is_client()) {
index b7bfd1d31d5fc05ca8de19c5b3c5a78e024c6704..401d96c9d3aee9e0bc52805d7a10e3e891089c01 100644 (file)
@@ -108,12 +108,12 @@ struct frag_info_t {
 
   // this frag
   utime_t mtime;
-  __s64 nfiles;        // files
-  __s64 nsubdirs;      // subdirs
+  int64_t nfiles;        // files
+  int64_t nsubdirs;      // subdirs
 
   frag_info_t() : version(0), nfiles(0), nsubdirs(0) {}
 
-  __s64 size() const { return nfiles + nsubdirs; }
+  int64_t size() const { return nfiles + nsubdirs; }
 
   void zero() {
     *this = frag_info_t();
@@ -168,13 +168,13 @@ struct nest_info_t {
 
   // this frag + children
   utime_t rctime;
-  __s64 rbytes;
-  __s64 rfiles;
-  __s64 rsubdirs;
-  __s64 rsize() const { return rfiles + rsubdirs; }
+  int64_t rbytes;
+  int64_t rfiles;
+  int64_t rsubdirs;
+  int64_t rsize() const { return rfiles + rsubdirs; }
 
-  __s64 ranchors;  // for dirstat, includes inode's anchored flag.
-  __s64 rsnaprealms;
+  int64_t ranchors;  // for dirstat, includes inode's anchored flag.
+  int64_t rsnaprealms;
 
   nest_info_t() : version(0),
                  rbytes(0), rfiles(0), rsubdirs(0),
@@ -301,7 +301,7 @@ inline ostream& operator<<(ostream &out, const vinodeno_t &vino) {
 
 
 struct byte_range_t {
-  __u64 first, last;    // interval client can write to
+  uint64_t first, last;    // interval client can write to
 
   void encode(bufferlist &bl) const {
     ::encode(first, bl);
@@ -383,8 +383,8 @@ struct inode_t {
     return layout.fl_object_size * layout.fl_stripe_count;
   }
 
-  __u64 get_max_size() const {
-    __u64 max = 0;
+  uint64_t get_max_size() const {
+    uint64_t max = 0;
       for (map<client_t,byte_range_t>::const_iterator p = client_ranges.begin();
           p != client_ranges.end();
           ++p)
@@ -392,7 +392,7 @@ struct inode_t {
          max = p->second.last;
       return max;
   }
-  void set_max_size(__u64 new_max) {
+  void set_max_size(uint64_t new_max) {
     if (new_max == 0) {
       client_ranges.clear();
     } else {
@@ -668,7 +668,7 @@ inline ostream& operator<<(ostream& out, const string_snap_t &k)
 
 struct metareqid_t {
   entity_name_t name;
-  __u64 tid;
+  uint64_t tid;
   metareqid_t() : tid(0) {}
   metareqid_t(entity_name_t n, tid_t t) : name(n), tid(t) {}
 };
@@ -721,7 +721,7 @@ struct cap_reconnect_t {
   ceph_mds_cap_reconnect capinfo;
 
   cap_reconnect_t() {}
-  cap_reconnect_t(__u64 cap_id, inodeno_t pino, const string& p, int w, int i, uint64_t sz, utime_t mt, utime_t at, inodeno_t sr) : 
+  cap_reconnect_t(uint64_t cap_id, inodeno_t pino, const string& p, int w, int i, uint64_t sz, utime_t mt, utime_t at, inodeno_t sr) : 
     path(p) {
     capinfo.cap_id = cap_id;
     capinfo.wanted = w;
@@ -1130,8 +1130,8 @@ class MDSCacheObject {
   const static int STATE_REJOINING = (1<<28);  // replica has not joined w/ primary copy
 
   // -- wait --
-  const static __u64 WAIT_SINGLEAUTH  = (1ull<<60);
-  const static __u64 WAIT_UNFREEZE    = (1ull<<59); // pka AUTHPINNABLE
+  const static uint64_t WAIT_SINGLEAUTH  = (1ull<<60);
+  const static uint64_t WAIT_UNFREEZE    = (1ull<<59); // pka AUTHPINNABLE
 
 
   // ============================================
@@ -1316,16 +1316,16 @@ protected:
   // ---------------------------------------------
   // waiting
  protected:
-  multimap<__u64, Context*>  waiting;
+  multimap<uint64_t, Context*>  waiting;
 
  public:
-  bool is_waiter_for(__u64 mask, __u64 min=0) {
+  bool is_waiter_for(uint64_t mask, uint64_t min=0) {
     if (!min) {
       min = mask;
       while (min & (min-1))  // if more than one bit is set
        min &= min-1;        //  clear LSB
     }
-    for (multimap<__u64,Context*>::iterator p = waiting.lower_bound(min);
+    for (multimap<uint64_t,Context*>::iterator p = waiting.lower_bound(min);
         p != waiting.end();
         ++p) {
       if (p->first & mask) return true;
@@ -1333,19 +1333,19 @@ protected:
     }
     return false;
   }
-  virtual void add_waiter(__u64 mask, Context *c) {
+  virtual void add_waiter(uint64_t mask, Context *c) {
     if (waiting.empty())
       get(PIN_WAITER);
-    waiting.insert(pair<__u64,Context*>(mask, c));
+    waiting.insert(pair<uint64_t,Context*>(mask, c));
     pdout(10,g_conf.debug_mds) << (mdsco_db_line_prefix(this)) 
                               << "add_waiter " << hex << mask << dec << " " << c
                               << " on " << *this
                               << dendl;
     
   }
-  virtual void take_waiting(__u64 mask, list<Context*>& ls) {
+  virtual void take_waiting(uint64_t mask, list<Context*>& ls) {
     if (waiting.empty()) return;
-    multimap<__u64,Context*>::iterator it = waiting.begin();
+    multimap<uint64_t,Context*>::iterator it = waiting.begin();
     while (it != waiting.end()) {
       if (it->first & mask) {
        ls.push_back(it->second);
@@ -1366,7 +1366,7 @@ protected:
     if (waiting.empty())
       put(PIN_WAITER);
   }
-  void finish_waiting(__u64 mask, int result = 0) {
+  void finish_waiting(uint64_t mask, int result = 0) {
     list<Context*> finished;
     take_waiting(mask, finished);
     finish_contexts(finished, result);
@@ -1380,9 +1380,9 @@ protected:
   virtual void set_object_info(MDSCacheObjectInfo &info) { assert(0); }
   virtual void encode_lock_state(int type, bufferlist& bl) { assert(0); }
   virtual void decode_lock_state(int type, bufferlist& bl) { assert(0); }
-  virtual void finish_lock_waiters(int type, __u64 mask, int r=0) { assert(0); }
-  virtual void add_lock_waiter(int type, __u64 mask, Context *c) { assert(0); }
-  virtual bool is_lock_waiting(int type, __u64 mask) { assert(0); return false; }
+  virtual void finish_lock_waiters(int type, uint64_t mask, int r=0) { assert(0); }
+  virtual void add_lock_waiter(int type, uint64_t mask, Context *c) { assert(0); }
+  virtual bool is_lock_waiting(int type, uint64_t mask) { assert(0); return false; }
 
   virtual void clear_dirty_scattered(int type) { assert(0); }
   virtual void finish_scatter_gather_update(int type) { }
index 7fa86b31c07c88cd556629dcf0a69f38973aa75d..f43ac0133a6a51ab507752f63729a8546372915e 100644 (file)
@@ -25,7 +25,7 @@
 #define DOUT_SUBSYS mds
 #undef dout_prefix
 #define dout_prefix _prefix(mdcache->mds->get_nodeid(), inode, seq, this)
-static ostream& _prefix(int whoami, CInode *inode, __u64 seq, SnapRealm *realm) {
+static ostream& _prefix(int whoami, CInode *inode, uint64_t seq, SnapRealm *realm) {
   return *_dout << dbeginl
                << " mds" << whoami
                << ".cache.snaprealm(" << inode->ino()
index 94a5710dfc6ad72df0679fef19028374a53d6d2c..83fb62864962a6dc07f4df9aba33f838657e5c59 100644 (file)
 struct MAuthReply : public Message {
   __u32 protocol;
   __s32 result;
-  __u64 global_id;      // if zero, meaningless
+  uint64_t global_id;      // if zero, meaningless
   cstring result_msg;
   bufferlist result_bl;
 
   MAuthReply() : Message(CEPH_MSG_AUTH_REPLY), protocol(0), result(0) {}
-  MAuthReply(__u32 p, bufferlist *bl = NULL, int r = 0, __u64 gid=0, const char *msg = 0) :
+  MAuthReply(__u32 p, bufferlist *bl = NULL, int r = 0, uint64_t gid=0, const char *msg = 0) :
     Message(CEPH_MSG_AUTH_REPLY),
     protocol(p), result(r), global_id(gid),
     result_msg(msg) {
index f48df57deab093b23c6ad88382d958e0b9bed65e..ed0d43a40701ea6efc3081aa85c0f34a569dcc60 100644 (file)
@@ -33,12 +33,12 @@ class MClientCaps : public Message {
 
   inodeno_t get_ino() { return inodeno_t(head.ino); }
   inodeno_t get_realm() { return inodeno_t(head.realm); }
-  __u64 get_cap_id() { return head.cap_id; }
+  uint64_t get_cap_id() { return head.cap_id; }
 
-  __u64 get_size() { return head.size;  }
-  __u64 get_max_size() { return head.max_size;  }
+  uint64_t get_size() { return head.size;  }
+  uint64_t get_max_size() { return head.max_size;  }
   __u32 get_truncate_seq() { return head.truncate_seq; }
-  __u64 get_truncate_size() { return head.truncate_size; }
+  uint64_t get_truncate_size() { return head.truncate_size; }
   utime_t get_ctime() { return utime_t(head.ctime); }
   utime_t get_mtime() { return utime_t(head.mtime); }
   utime_t get_atime() { return utime_t(head.atime); }
@@ -49,8 +49,8 @@ class MClientCaps : public Message {
   int       get_migrate_seq() { return head.migrate_seq; }
   int       get_op() { return head.op; }
 
-  __u64 get_client_tid() { return get_tid(); }
-  void set_client_tid(__u64 s) { set_tid(s); }
+  uint64_t get_client_tid() { return get_tid(); }
+  void set_client_tid(uint64_t s) { set_tid(s); }
 
   snapid_t get_snap_follows() { return snapid_t(head.snap_follows); }
   void set_snap_follows(snapid_t s) { head.snap_follows = s; }
@@ -58,7 +58,7 @@ class MClientCaps : public Message {
   void set_caps(int c) { head.caps = c; }
   void set_wanted(int w) { head.wanted = w; }
 
-  void set_max_size(__u64 ms) { head.max_size = ms; }
+  void set_max_size(uint64_t ms) { head.max_size = ms; }
 
   void set_migrate_seq(unsigned m) { head.migrate_seq = m; }
   void set_op(int o) { head.op = o; }
@@ -71,7 +71,7 @@ class MClientCaps : public Message {
   MClientCaps(int op,
              inodeno_t ino,
              inodeno_t realm,
-             __u64 id,
+             uint64_t id,
              long seq,
              int caps,
              int wanted,
@@ -91,7 +91,7 @@ class MClientCaps : public Message {
   }
   MClientCaps(int op,
              inodeno_t ino, inodeno_t realm,
-             __u64 id, int mseq) :
+             uint64_t id, int mseq) :
     Message(CEPH_MSG_CLIENT_CAPS) {
     memset(&head, 0, sizeof(head));
     head.op = op;
index 3e6a0d8c9cc5c58ddf2bdb6c887456693d2ed655..ed2d690e0b1db9c710e79d25e2ac8f47a268903e 100644 (file)
@@ -30,7 +30,7 @@ struct MClientLease : public Message {
   snapid_t get_last() { return snapid_t(h.last); }
 
   MClientLease() : Message(CEPH_MSG_CLIENT_LEASE) {}
-  MClientLease(int ac, ceph_seq_t seq, int m, __u64 i, __u64 sf, __u64 sl) :
+  MClientLease(int ac, ceph_seq_t seq, int m, uint64_t i, uint64_t sf, uint64_t sl) :
     Message(CEPH_MSG_CLIENT_LEASE) {
     h.action = ac;
     h.seq = seq;
@@ -39,7 +39,7 @@ struct MClientLease : public Message {
     h.first = sf;
     h.last = sl;
   }
-  MClientLease(int ac, ceph_seq_t seq, int m, __u64 i, __u64 sf, __u64 sl, const nstring& d) :
+  MClientLease(int ac, ceph_seq_t seq, int m, uint64_t i, uint64_t sf, uint64_t sl, const nstring& d) :
     Message(CEPH_MSG_CLIENT_LEASE),
     dname(d) {
     h.action = ac;
index 27fd843b974738e2b2b7c2a9868bd59b7215afad..81f294421133aace005f897f69494c32ace36753 100644 (file)
@@ -34,7 +34,7 @@ public:
        << caps.size() << " caps)";
   }
 
-  void add_cap(inodeno_t ino, __u64 cap_id, inodeno_t pathbase, const string& path,
+  void add_cap(inodeno_t ino, uint64_t cap_id, inodeno_t pathbase, const string& path,
               int wanted, int issued,
               loff_t sz, utime_t mt, utime_t at,
               inodeno_t sr) {
index 0163cc423614255a83ed0fbe23f315340e0d9350..ab6d9bb9acd54b56deaaec9a7e781032bfa70d64 100644 (file)
@@ -101,7 +101,7 @@ struct InodeStat {
   unsigned mode, uid, gid, nlink, rdev;
   loff_t size, max_size;
   version_t truncate_seq;
-  __u64 truncate_size;
+  uint64_t truncate_size;
   utime_t ctime, mtime, atime;
   version_t time_warp_seq;
 
index f516c33062a3e5dfa03de10ab21126894fb55aee..6ad26af4349e74834a932f1e851e537362271085 100644 (file)
@@ -23,7 +23,7 @@
 
 class MMDSBeacon : public PaxosServiceMessage {
   ceph_fsid_t fsid;
-  __u64 global_id;
+  uint64_t global_id;
   string name;
 
   __u32 state;
@@ -33,13 +33,13 @@ class MMDSBeacon : public PaxosServiceMessage {
 
  public:
   MMDSBeacon() : PaxosServiceMessage(MSG_MDS_BEACON, 0) {}
-  MMDSBeacon(const ceph_fsid_t &f, __u64 g, string& n, epoch_t les, int st, version_t se) : 
+  MMDSBeacon(const ceph_fsid_t &f, uint64_t g, string& n, epoch_t les, int st, version_t se) : 
     PaxosServiceMessage(MSG_MDS_BEACON, les), 
     fsid(f), global_id(g), name(n), state(st), seq(se),
     standby_for_rank(-1) { }
 
   ceph_fsid_t& get_fsid() { return fsid; }
-  __u64 get_global_id() { return global_id; }
+  uint64_t get_global_id() { return global_id; }
   string& get_name() { return name; }
   epoch_t get_last_epoch_seen() { return version; }
   int get_state() { return state; }
index 8b77d361ea773b0aead586f2b2f8733263eadb0d..381ffdd2c73c71da81eac1334fcdc70d065cfadd 100644 (file)
@@ -24,12 +24,12 @@ using std::map;
 
 class MMDSLoadTargets : public PaxosServiceMessage {
  public:
-  __u64 global_id;
+  uint64_t global_id;
   set<int32_t> targets;
 
   MMDSLoadTargets() : PaxosServiceMessage(MSG_MDS_OFFLOAD_TARGETS, 0) {}
 
-  MMDSLoadTargets(__u64 g, set<int32_t>& mds_targets) :
+  MMDSLoadTargets(uint64_t g, set<int32_t>& mds_targets) :
     PaxosServiceMessage(MSG_MDS_OFFLOAD_TARGETS, 0),
     global_id(g), targets(mds_targets) {}
 
index 0d7d8ff8e93c60e882d8f9a751604ec11804ae88..a203a68fe2194bf2a22eea40e8ccedbc62b02f6c 100644 (file)
@@ -23,11 +23,11 @@ class MMDSTableRequest : public Message {
  public:
   __u16 table;
   __s16 op;
-  __u64 reqid;
+  uint64_t reqid;
   bufferlist bl;
 
   MMDSTableRequest() {}
-  MMDSTableRequest(int tab, int o, __u64 r, version_t v=0) : 
+  MMDSTableRequest(int tab, int o, uint64_t r, version_t v=0) : 
     Message(MSG_MDS_TABLE_REQUEST),
     table(tab), op(o), reqid(r) {
     set_tid(v);
index 748da1f980503a29255f3294cff6dfcb516da63f..d3ed9970625d1a4920f412b1ed018647501498bd 100644 (file)
@@ -103,14 +103,14 @@ public:
   void set_mtime(utime_t mt) { head.mtime = mt; }
 
   // ops
-  void add_simple_op(int o, __u64 off, __u64 len) {
+  void add_simple_op(int o, uint64_t off, uint64_t len) {
     OSDOp osd_op;
     osd_op.op.op = o;
     osd_op.op.extent.offset = off;
     osd_op.op.extent.length = len;
     ops.push_back(osd_op);
   }
-  void write(__u64 off, __u64 len, bufferlist& bl) {
+  void write(uint64_t off, uint64_t len, bufferlist& bl) {
     add_simple_op(CEPH_OSD_OP_WRITE, off, len);
     data.claim(bl);
     header.data_off = off;
@@ -120,17 +120,17 @@ public:
     data.claim(bl);
     header.data_off = 0;
   }
-  void zero(__u64 off, __u64 len) {
+  void zero(uint64_t off, uint64_t len) {
     add_simple_op(CEPH_OSD_OP_ZERO, off, len);
   }
-  void truncate(__u64 off) {
+  void truncate(uint64_t off) {
     add_simple_op(CEPH_OSD_OP_TRUNCATE, off, 0);
   }
   void remove() {
     add_simple_op(CEPH_OSD_OP_DELETE, 0, 0);
   }
 
-  void read(__u64 off, __u64 len) {
+  void read(uint64_t off, uint64_t len) {
     add_simple_op(CEPH_OSD_OP_READ, off, len);
   }
   void stat() {
@@ -205,7 +205,7 @@ public:
       out << "w";
 #endif
     if (head.snapid != CEPH_NOSNAP)
-      out << "@" << snapid_t((__u64)head.snapid);
+      out << "@" << snapid_t((uint64_t)head.snapid);
 
     out << " " << ops;
     out << " " << pg_t(head.layout.ol_pgid);
index f0936f59e846241e7f56e73de429ac25e9145d79..19fe94da7daabed053bbbbb9ef50dc35a40b5234 100644 (file)
@@ -42,7 +42,7 @@ public:
   bool noop;
 
   bool old_exists;
-  __u64 old_size;
+  uint64_t old_size;
   eversion_t old_version;
 
   SnapSet snapset;
@@ -61,8 +61,8 @@ public:
 
   map<nstring,bufferptr> attrset;
 
-  interval_set<__u64> data_subset;
-  map<sobject_t, interval_set<__u64> > clone_subsets;
+  interval_set<uint64_t> data_subset;
+  map<sobject_t, interval_set<uint64_t> > clone_subsets;
 
  virtual void decode_payload() {
     bufferlist::iterator p = payload.begin();
index 9965e7980fc29ba920f4a356680ab2fa7c8d998a..43c99f693c83c0ab158b51731c65c4babcf4f18b 100644 (file)
@@ -49,7 +49,7 @@ public:
   int pool;
   string name;
   int op;
-  __u64 auid;
+  uint64_t auid;
 
   MPoolOp() : PaxosServiceMessage(MSG_POOLOP, 0) {}
   MPoolOp(const ceph_fsid_t& f, tid_t t, int p, string& n, int o, version_t v) :
@@ -58,7 +58,7 @@ public:
     set_tid(t);
   }
   MPoolOp(const ceph_fsid_t& f, tid_t t, int p, string& n,
-         int o, __u64 uid, version_t v) :
+         int o, uint64_t uid, version_t v) :
     PaxosServiceMessage(MSG_POOLOP, v), fsid(f), pool(p), name(n), op(o),
     auid(uid) {
     set_tid(t);
index 9a0e350746a13d7e7fb8f8d7fb7857784a3b1fc1..f0701404fce4a3af2881c59b602d4a6b48305a54 100644 (file)
 #include "include/encoding.h"
 
 struct MRoute : public Message {
-  __u64 session_mon_tid;
+  uint64_t session_mon_tid;
   Message *msg;
   entity_inst_t dest;
   
   MRoute() : Message(MSG_ROUTE), msg(NULL) {}
-  MRoute(__u64 t, Message *m, entity_inst_t i) :
+  MRoute(uint64_t t, Message *m, entity_inst_t i) :
     Message(MSG_ROUTE), session_mon_tid(t), msg(m), dest(i) {}
-  MRoute(__u64 t, bufferlist bl, entity_inst_t i) :
+  MRoute(uint64_t t, bufferlist bl, entity_inst_t i) :
     Message(MSG_ROUTE), session_mon_tid(t), dest(i) {
     bufferlist::iterator p = bl.begin();
     msg = decode_message(p);
index 88695f3d7536f3f16700bf525747a9a48b99a656..59a30182b3e164f3327123e8fe989c2f318fd150 100644 (file)
@@ -8,7 +8,7 @@ class PaxosServiceMessage : public Message {
  public:
   version_t version;
   __s16 session_mon;
-  __u64 session_mon_tid;
+  uint64_t session_mon_tid;
   
  PaxosServiceMessage() : Message(MSG_PAXOS),
                         version(0), session_mon(-1), session_mon_tid(0) { }
index 9eb745004ebe8c56f8eed54309872ecf9a3b351f..eeffecd1e33b3cd232801b69a0f3cc88aa274562 100644 (file)
@@ -416,7 +416,7 @@ bool AuthMonitor::prep_auth(MAuth *m, bool paxos_writable)
   }
 
   try {
-    __u64 auid;
+    uint64_t auid;
     if (start) {
       // new session
       proto = s->auth_handler->start_session(entity_name, indata, response_bl, caps_info);
index e8557468c1114dcbcb016f8ab421ca6ae0a4210d..ff74ab325d267b1ead4b40ee141e976725026b13 100644 (file)
@@ -142,7 +142,7 @@ bool MDSMonitor::preprocess_query(PaxosServiceMessage *m)
 
 void MDSMonitor::_note_beacon(MMDSBeacon *m)
 {
-  __u64 gid = m->get_global_id();
+  uint64_t gid = m->get_global_id();
   version_t seq = m->get_seq();
 
   dout(15) << "_note_beacon " << *m << " noting time" << dendl;
@@ -154,7 +154,7 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
 {
   entity_addr_t addr = m->get_orig_source_inst().addr;
   int state = m->get_state();
-  __u64 gid = m->get_global_id();
+  uint64_t gid = m->get_global_id();
   version_t seq = m->get_seq();
   MDSMap::mds_info_t info;
 
@@ -250,7 +250,7 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
 bool MDSMonitor::preprocess_offload_targets(MMDSLoadTargets* m)
 {
   dout(10) << "preprocess_offload_targets " << *m << " from " << m->get_orig_source() << dendl;
-  __u64 gid;
+  uint64_t gid;
   
   // check privileges, ignore message if fails
   MonSession *session = m->get_session();
@@ -305,7 +305,7 @@ bool MDSMonitor::prepare_beacon(MMDSBeacon *m)
   // -- this is an update --
   dout(12) << "prepare_beacon " << *m << " from " << m->get_orig_source_inst() << dendl;
   entity_addr_t addr = m->get_orig_source_inst().addr;
-  __u64 gid = m->get_global_id();
+  uint64_t gid = m->get_global_id();
   int state = m->get_state();
   version_t seq = m->get_seq();
 
@@ -361,7 +361,7 @@ bool MDSMonitor::prepare_beacon(MMDSBeacon *m)
 
 bool MDSMonitor::prepare_offload_targets(MMDSLoadTargets *m)
 {
-  __u64 gid = m->global_id;
+  uint64_t gid = m->global_id;
   if (pending_mdsmap.mds_info.count(gid)) {
     dout(10) << "prepare_offload_targets " << gid << " " << m->targets << dendl;
     pending_mdsmap.mds_info[gid].export_targets = m->targets;
@@ -523,7 +523,7 @@ bool MDSMonitor::prepare_command(MMonCommand *m)
       int who = atoi(m->cmd[2].c_str());
       if (mdsmap.is_active(who)) {
        r = 0;
-       __u64 gid = pending_mdsmap.up[who];
+       uint64_t gid = pending_mdsmap.up[who];
        ss << "telling mds" << who << " " << pending_mdsmap.mds_info[gid].addr << " to stop";
        pending_mdsmap.mds_info[gid].state = MDSMap::STATE_STOPPING;
       } else {
@@ -554,7 +554,7 @@ bool MDSMonitor::prepare_command(MMonCommand *m)
        //ss << "mdsmap fsid " << map.fsid << " does not match monitor fsid " << mon->monmap->fsid;
     }
     else if (m->cmd[1] == "set_state" && m->cmd.size() == 4) {
-      __u64 gid = atoi(m->cmd[2].c_str());
+      uint64_t gid = atoi(m->cmd[2].c_str());
       int state = atoi(m->cmd[3].c_str());
       if (!pending_mdsmap.is_dne_gid(gid)) {
        MDSMap::mds_info_t& info = pending_mdsmap.get_info_gid(gid);
@@ -628,7 +628,7 @@ void MDSMonitor::tick()
     string name;
     while (pending_mdsmap.is_in(mds))
       mds++;
-    __u64 newgid = pending_mdsmap.find_standby_for(mds, name);
+    uint64_t newgid = pending_mdsmap.find_standby_for(mds, name);
     if (!newgid)
       break;
 
@@ -653,7 +653,7 @@ void MDSMonitor::tick()
   cutoff -= g_conf.mds_beacon_grace;
 
   // make sure last_beacon is fully populated
-  for (map<__u64,MDSMap::mds_info_t>::iterator p = pending_mdsmap.mds_info.begin();
+  for (map<uint64_t,MDSMap::mds_info_t>::iterator p = pending_mdsmap.mds_info.begin();
        p != pending_mdsmap.mds_info.end();
        ++p) {
     if (last_beacon.count(p->first) == 0) {
@@ -670,11 +670,11 @@ void MDSMonitor::tick()
 
     bool propose_osdmap = false;
 
-    map<__u64, beacon_info_t>::iterator p = last_beacon.begin();
+    map<uint64_t, beacon_info_t>::iterator p = last_beacon.begin();
     while (p != last_beacon.end()) {
-      __u64 gid = p->first;
+      uint64_t gid = p->first;
       utime_t since = p->second.stamp;
-      __u64 seq = p->second.seq;
+      uint64_t seq = p->second.seq;
       p++;
       
       if (pending_mdsmap.mds_info.count(gid) == 0) {
@@ -694,7 +694,7 @@ void MDSMonitor::tick()
       
       // are we in?
       // and is there a non-laggy standby that can take over for us?
-      __u64 sgid;
+      uint64_t sgid;
       if (info.rank >= 0 &&
          info.state != CEPH_MDS_STATE_STANDBY &&
          (sgid = pending_mdsmap.find_standby_for(info.rank, info.name)) != 0) {
@@ -769,7 +769,7 @@ void MDSMonitor::tick()
     set<int>::iterator p = failed.begin();
     while (p != failed.end()) {
       int f = *p++;
-      __u64 sgid;
+      uint64_t sgid;
       string name;  // FIXME
       sgid = pending_mdsmap.find_standby_for(f, name);
       if (sgid) {
@@ -791,8 +791,8 @@ void MDSMonitor::tick()
       pending_mdsmap.get_num_mds(MDSMap::STATE_STANDBY) >= pending_mdsmap.get_num_mds()) {
     // see which nodes are shadowed
     set<int> shadowed;
-    map<int, set<__u64> > avail;
-    for (map<__u64,MDSMap::mds_info_t>::iterator p = pending_mdsmap.mds_info.begin();
+    map<int, set<uint64_t> > avail;
+    for (map<uint64_t,MDSMap::mds_info_t>::iterator p = pending_mdsmap.mds_info.begin();
         p != pending_mdsmap.mds_info.end();
         p++) {
       if (p->second.state == MDSMap::STATE_STANDBY_REPLAY) 
@@ -810,7 +810,7 @@ void MDSMonitor::tick()
        continue;  // already shadowed.
       if (pending_mdsmap.get_state(*p) < MDSMap::STATE_ACTIVE)
        continue;  // only shadow active mds
-      __u64 sgid;
+      uint64_t sgid;
       if (avail[*p].size()) {
        sgid = *avail[*p].begin();
        avail[*p].erase(avail[*p].begin());
@@ -845,9 +845,9 @@ void MDSMonitor::do_stop()
   dout(7) << "do_stop stopping active mds nodes" << dendl;
   print_map(mdsmap);
 
-  map<__u64,MDSMap::mds_info_t>::iterator p = pending_mdsmap.mds_info.begin();
+  map<uint64_t,MDSMap::mds_info_t>::iterator p = pending_mdsmap.mds_info.begin();
   while (p != pending_mdsmap.mds_info.end()) {
-    __u64 gid = p->first;
+    uint64_t gid = p->first;
     MDSMap::mds_info_t& info = p->second;
     p++;
     switch (info.state) {
index 4765545056f45bf3d67c0aaa4a5fb7d4bf071fdc..b833ac1730dc3bc5e2a33939e362d2c554a5a46a 100644 (file)
@@ -89,9 +89,9 @@ class MDSMonitor : public PaxosService {
   // beacons
   struct beacon_info_t {
     utime_t stamp;
-    __u64 seq;
+    uint64_t seq;
   };
-  map<__u64, beacon_info_t> last_beacon;
+  map<uint64_t, beacon_info_t> last_beacon;
 
 public:
   MDSMonitor(Monitor *mn, Paxos *p) : PaxosService(mn, p) { }
index bd8b523ee837760e184ad3c17223f9d92d6c836e..1b297d1d6ba3751fce3d8ac0e004b8500b49486a 100644 (file)
@@ -244,7 +244,7 @@ rwx_t MonCaps::get_caps(int service)
  * only get as much access as they allow you AND you have on your own data.
  *
  */
-bool MonCaps::check_privileges(int service, int req_perms, __u64 req_auid)
+bool MonCaps::check_privileges(int service, int req_perms, uint64_t req_auid)
 {
   if (allow_all) return true; //you're an admin, do anything!
   if (req_auid != CEPH_AUTH_UID_DEFAULT && req_auid != auid) {
index 65ac28ff9778b2b795ba3b910282835c3b183fc1..64ec34dd606ad4186bc7a2f2e2a7091f1224d7e6 100644 (file)
@@ -67,7 +67,7 @@ struct MonCaps {
   bool is_rwx(string& token, rwx_t& cap_val);
   int get_service_id(string& token);
   bool allow_all;
-  __u64 auid;
+  uint64_t auid;
 public:
   MonCaps() : text(), default_action(0),
              allow_all(false), auid(CEPH_AUTH_UID_DEFAULT) {}
@@ -75,9 +75,9 @@ public:
   bool parse(bufferlist::iterator& iter);
   rwx_t get_caps(int service);
   bool check_privileges(int service, int req_perm,
-                       __u64 auid=CEPH_AUTH_UID_DEFAULT);
+                       uint64_t auid=CEPH_AUTH_UID_DEFAULT);
   void set_allow_all(bool allow) { allow_all = allow; }
-  void set_auid(__u64 uid) { auid = uid; }
+  void set_auid(uint64_t uid) { auid = uid; }
 
   void encode(bufferlist& bl) const {
     ::encode(text, bl);
index 3a9559f4eb125e72cf47da847b8a1565e1843519..9da444f2d3ae5949bcd0f9a9040586512653d5cd 100644 (file)
@@ -482,7 +482,7 @@ void Monitor::resend_routed_requests()
 {
   dout(10) << "resend_routed_requests" << dendl;
   int mon = get_leader();
-  for (map<__u64, RoutedRequest*>::iterator p = routed_requests.begin();
+  for (map<uint64_t, RoutedRequest*>::iterator p = routed_requests.begin();
        p != routed_requests.end();
        p++) {
     RoutedRequest *rr = p->second;
@@ -501,7 +501,7 @@ void Monitor::remove_session(MonSession *s)
 {
   dout(10) << "remove_session " << s << " " << s->inst << dendl;
   assert(!s->closed);
-  for (set<__u64>::iterator p = s->routed_request_tids.begin();
+  for (set<uint64_t>::iterator p = s->routed_request_tids.begin();
        p != s->routed_request_tids.end();
        p++) {
     if (routed_requests.count(*p)) {
index cba7f401da2825e20cd54281d1b089c99c483a58..829c506e346f83473c910145914bce8f5e74a210 100644 (file)
@@ -161,7 +161,7 @@ public:
 
   // request routing
   struct RoutedRequest {
-    __u64 tid;
+    uint64_t tid;
     bufferlist request_bl;
     MonSession *session;
 
@@ -170,8 +170,8 @@ public:
        session->put();
     }
   };
-  __u64 routed_request_tid;
-  map<__u64, RoutedRequest*> routed_requests;
+  uint64_t routed_request_tid;
+  map<uint64_t, RoutedRequest*> routed_requests;
   
   void forward_request_leader(PaxosServiceMessage *req);
   void handle_forward(MForward *m);
index f1ccdb459a02f36254653bf3b6927154b52621e1..3691d17ca3ed619faf0c31eae6ce3e51dbe5b03e 100644 (file)
@@ -1052,7 +1052,7 @@ bool OSDMonitor::preprocess_command(MMonCommand *m)
       }
     }
     else if (m->cmd[1] == "lspools") {
-      __u64 uid_pools = 0;
+      uint64_t uid_pools = 0;
       if (m->cmd.size() > 2) {
        uid_pools = strtol(m->cmd[2].c_str(), NULL, 10);
       }
@@ -1087,7 +1087,7 @@ int OSDMonitor::prepare_new_pool(MPoolOp *m)
     return prepare_new_pool(m->name, session->caps.auid);
 }
 
-int OSDMonitor::prepare_new_pool(string& name, __u64 auid)
+int OSDMonitor::prepare_new_pool(string& name, uint64_t auid)
 {
   if (osdmap.name_pool.count(name)) {
     return -EEXIST;
index 246822508f9721ae49f6d7408e62abfd0ad263eb..ba151ae6411e4eff459e7eb09261aebb7c18cbb5 100644 (file)
@@ -90,7 +90,7 @@ private:
   bool prepare_pool_op_create (MPoolOp *m);
   bool prepare_pool_op_delete(MPoolOp *m);
   bool prepare_pool_op_auid(MPoolOp *m);
-  int prepare_new_pool(string& name, __u64 auid = CEPH_AUTH_UID_DEFAULT);
+  int prepare_new_pool(string& name, uint64_t auid = CEPH_AUTH_UID_DEFAULT);
   int prepare_new_pool(MPoolOp *m);
 
   void _pool_op(MPoolOp *m, int replyCode, epoch_t epoch);
index 0c3ad3666831e91b6fab8c2ae0d8a82e1cd573c3..d67222612b8aaa4fb837738f44b6faa717821f42 100644 (file)
@@ -39,7 +39,7 @@ struct MonSession : public RefCountedObject {
   utime_t until;
   bool closed;
   xlist<MonSession*>::item item;
-  set<__u64> routed_request_tids;
+  set<uint64_t> routed_request_tids;
   MonCaps caps;
   uint64_t global_id;
   uint64_t notified_global_id;
index 97bca7172f3983f2d151b520bf89573d8b419cf6..f850de3abe6c1daafc7e8905c6c2fe085987aa8d 100644 (file)
@@ -311,8 +311,8 @@ public:
   int get_type() { return header.type; }
   void set_type(int t) { header.type = t; }
 
-  __u64 get_tid() { return header.tid; }
-  void set_tid(__u64 t) { header.tid = t; }
+  uint64_t get_tid() { return header.tid; }
+  void set_tid(uint64_t t) { header.tid = t; }
 
   unsigned get_seq() { return header.seq; }
   void set_seq(unsigned s) { header.seq = s; }
index 5f72aca530e20030eb966ffc549a74ca89f1de00..bf60434e90ce51d1782e71fef10cf0642b58d340 100644 (file)
@@ -622,7 +622,7 @@ int SimpleMessenger::Pipe::accept()
   bufferptr bp;
   bufferlist authorizer, authorizer_reply;
   bool authorizer_valid;
-  __u64 feat_missing;
+  uint64_t feat_missing;
 
   // this should roughly mirror pseudocode at
   //  http://ceph.newdream.net/wiki/Messaging_protocol
@@ -671,7 +671,7 @@ int SimpleMessenger::Pipe::accept()
       goto reply;
     }
 
-    feat_missing = get_required_bits() & ~(__u64)connect.features;
+    feat_missing = get_required_bits() & ~(uint64_t)connect.features;
     if (feat_missing) {
       dout(1) << "peer missing required features " << std::hex << feat_missing << std::dec << dendl;
       reply.tag = CEPH_MSGR_TAG_FEATURES;
@@ -803,7 +803,7 @@ int SimpleMessenger::Pipe::accept()
     assert(0);    
 
   reply:
-    reply.features = ((__u64)connect.features & get_supported_bits()) | get_required_bits();
+    reply.features = ((uint64_t)connect.features & get_supported_bits()) | get_required_bits();
     reply.authorizer_len = authorizer_reply.length();
     rc = tcp_write(sd, (char*)&reply, sizeof(reply));
     if (rc < 0)
@@ -1148,7 +1148,7 @@ int SimpleMessenger::Pipe::connect()
     }
 
     if (reply.tag == CEPH_MSGR_TAG_READY) {
-      __u64 feat_missing = get_required_bits() & ~(__u64)reply.features;
+      uint64_t feat_missing = get_required_bits() & ~(uint64_t)reply.features;
       if (feat_missing) {
        dout(1) << "missing required features " << std::hex << feat_missing << std::dec << dendl;
        goto fail_locked;
@@ -1879,7 +1879,7 @@ int SimpleMessenger::Pipe::do_sendmsg(int sd, struct msghdr *msg, int len, bool
 }
 
 
-int SimpleMessenger::Pipe::write_ack(__u64 seq)
+int SimpleMessenger::Pipe::write_ack(uint64_t seq)
 {
   dout(10) << "write_ack " << seq << dendl;
 
index d0a520dcad411efa9a67ae7e8b601b849ed685e7..dc9ade0a01afe4275d6b3cb41d457dc59eb55fe9 100644 (file)
@@ -131,8 +131,8 @@ private:
     bool keepalive;
     
     __u32 connect_seq, peer_global_seq;
-    __u64 out_seq;
-    __u64 in_seq, in_seq_acked;
+    uint64_t out_seq;
+    uint64_t in_seq, in_seq_acked;
     
     int get_required_bits(); /* get bits this Messenger requires
                              * the peer to support */
@@ -147,7 +147,7 @@ private:
     Message *read_message();
     int write_message(Message *m);
     int do_sendmsg(int sd, struct msghdr *msg, int len, bool more=false);
-    int write_ack(__u64 s);
+    int write_ack(uint64_t s);
     int write_keepalive();
 
     void fault(bool silent=false, bool reader=false);
index 584692564f3d1ad3ea1f50a6a6444ff470f816da..fac13173fc0cde77bf60dbda42dfb82d0ed63bda 100644 (file)
@@ -23,7 +23,7 @@
 class entity_name_t {
 public:
   __u8 _type;
-  __s64 _num;
+  int64_t _num;
 
 public:
   static const int TYPE_MON = CEPH_ENTITY_TYPE_MON;
@@ -35,7 +35,7 @@ public:
 
   // cons
   entity_name_t() : _type(0), _num(0) { }
-  entity_name_t(int t, __s64 n) : _type(t), _num(n) { }
+  entity_name_t(int t, int64_t n) : _type(t), _num(n) { }
   entity_name_t(const ceph_entity_name &n) : 
     _type(n.type), _num(n.num) { }
 
@@ -45,7 +45,7 @@ public:
   static entity_name_t OSD(int i=NEW) { return entity_name_t(TYPE_OSD, i); }
   static entity_name_t CLIENT(int i=NEW) { return entity_name_t(TYPE_CLIENT, i); }
   
-  __s64 num() const { return _num; }
+  int64_t num() const { return _num; }
   int type() const { return _type; }
   const char *type_str() const {
     return ceph_entity_type_name(type());
index ad66036915c4f19233a9c118918753a238e3ba3a..9d5f20af9cddad50c03d5739cfffa6f4263ca2d8 100644 (file)
@@ -59,7 +59,7 @@ int FileJournal::_open(bool forwrite, bool create)
   block_size = st.st_blksize;
 
   if (create && max_size < (g_conf.osd_journal_size << 20)) {
-    __u64 newsize = g_conf.osd_journal_size << 20;
+    uint64_t newsize = g_conf.osd_journal_size << 20;
     dout(10) << "_open extending to " << newsize << " bytes" << dendl;
     r = ::ftruncate(fd, newsize);
     if (r == 0)
@@ -180,7 +180,7 @@ int FileJournal::create()
   return 0;
 }
 
-int FileJournal::open(__u64 next_seq)
+int FileJournal::open(uint64_t next_seq)
 {
   dout(2) << "open " << fn << " next_seq " << next_seq << dendl;
 
@@ -227,7 +227,7 @@ int FileJournal::open(__u64 next_seq)
 
   // find next entry
   read_pos = header.start;
-  __u64 seq = 0;
+  uint64_t seq = 0;
   while (1) {
     bufferlist bl;
     off64_t old_pos = read_pos;
@@ -324,7 +324,7 @@ bufferptr FileJournal::prepare_header()
 
 
 
-int FileJournal::check_for_full(__u64 seq, off64_t pos, off64_t size)
+int FileJournal::check_for_full(uint64_t seq, off64_t pos, off64_t size)
 {
   // already full?
   if (full_commit_seq || full_restart_seq)
@@ -377,7 +377,7 @@ int FileJournal::check_for_full(__u64 seq, off64_t pos, off64_t size)
   return -ENOSPC;
 }
 
-int FileJournal::prepare_multi_write(bufferlist& bl, __u64& orig_ops, __u64& orig_bytes)
+int FileJournal::prepare_multi_write(bufferlist& bl, uint64_t& orig_ops, uint64_t& orig_bytes)
 {
   // gather queued writes
   off64_t queue_pos = write_pos;
@@ -415,10 +415,10 @@ int FileJournal::prepare_multi_write(bufferlist& bl, __u64& orig_ops, __u64& ori
   return 0;
 }
 
-int FileJournal::prepare_single_write(bufferlist& bl, off64_t& queue_pos, __u64& orig_ops, __u64& orig_bytes)
+int FileJournal::prepare_single_write(bufferlist& bl, off64_t& queue_pos, uint64_t& orig_ops, uint64_t& orig_bytes)
 {
   // grab next item
-  __u64 seq = writeq.front().seq;
+  uint64_t seq = writeq.front().seq;
   bufferlist &ebl = writeq.front().bl;
   off64_t base_size = 2*sizeof(entry_header_t) + ebl.length();
   off64_t size = ROUND_UP_TO(base_size, header.alignment);
@@ -458,7 +458,7 @@ int FileJournal::prepare_single_write(bufferlist& bl, off64_t& queue_pos, __u64&
 
   // pop from writeq
   writeq.pop_front();
-  journalq.push_back(pair<__u64,off64_t>(seq, queue_pos));
+  journalq.push_back(pair<uint64_t,off64_t>(seq, queue_pos));
 
   queue_pos += size;
   if (queue_pos > header.max_size)
@@ -622,8 +622,8 @@ void FileJournal::write_thread_entry()
       continue;
     }
     
-    __u64 orig_ops = 0;
-    __u64 orig_bytes = 0;
+    uint64_t orig_ops = 0;
+    uint64_t orig_bytes = 0;
 
     bufferlist bl;
     int r = prepare_multi_write(bl, orig_ops, orig_bytes);
@@ -636,8 +636,8 @@ void FileJournal::write_thread_entry()
     assert(r == 0);
     do_write(bl);
     
-    __u64 new_ops = throttle_ops.put(orig_ops);
-    __u64 new_bytes = throttle_bytes.put(orig_bytes);
+    uint64_t new_ops = throttle_ops.put(orig_ops);
+    uint64_t new_bytes = throttle_bytes.put(orig_bytes);
     dout(10) << "write_thread throttle finished " << orig_ops << " ops and " 
             << orig_bytes << " bytes, now "
             << new_ops << " ops and " << new_bytes << " bytes"
@@ -649,7 +649,7 @@ void FileJournal::write_thread_entry()
 }
 
 
-void FileJournal::submit_entry(__u64 seq, bufferlist& e, Context *oncommit)
+void FileJournal::submit_entry(uint64_t seq, bufferlist& e, Context *oncommit)
 {
   Mutex::Locker locker(write_lock);  // ** lock **
 
@@ -682,7 +682,7 @@ void FileJournal::submit_entry(__u64 seq, bufferlist& e, Context *oncommit)
 }
 
 
-void FileJournal::committed_thru(__u64 seq)
+void FileJournal::committed_thru(uint64_t seq)
 {
   Mutex::Locker locker(write_lock);
 
@@ -786,7 +786,7 @@ void FileJournal::wrap_read_bl(off64_t& pos, int64_t olen, bufferlist& bl)
   }
 }
 
-bool FileJournal::read_entry(bufferlist& bl, __u64& seq)
+bool FileJournal::read_entry(bufferlist& bl, uint64_t& seq)
 {
   if (!read_pos) {
     dout(2) << "read_entry -- not readable" << dendl;
@@ -843,7 +843,7 @@ bool FileJournal::read_entry(bufferlist& bl, __u64& seq)
 
   // ok!
   seq = h->seq;
-  journalq.push_back(pair<__u64,off64_t>(h->seq, read_pos));
+  journalq.push_back(pair<uint64_t,off64_t>(h->seq, read_pos));
 
   read_pos = pos;
   assert(read_pos % header.alignment == 0);
index d96c4d68f355e5508cd3c99509494d46ce65a30c..80a3b090ab5a4bad9911228694c1691854d6c108 100644 (file)
@@ -33,11 +33,11 @@ public:
   struct header_t {
     __u32 version;
     __u32 flags;
-    __u64 fsid;
+    uint64_t fsid;
     __u32 block_size;
     __u32 alignment;
-    __s64 max_size;   // max size of journal ring buffer
-    __s64 start;      // offset of first entry
+    int64_t max_size;   // max size of journal ring buffer
+    int64_t start;      // offset of first entry
 
     header_t() : version(1), flags(0), fsid(0), block_size(0), alignment(0), max_size(0), start(0) {}
 
@@ -78,27 +78,27 @@ private:
   off64_t write_pos;      // byte where the next entry to be written will go
   off64_t read_pos;       // 
 
-  __u64 last_committed_seq;
+  uint64_t last_committed_seq;
 
-  __u64 full_commit_seq;  // don't write, wait for this seq to commit
-  __u64 full_restart_seq; // start writing again with this seq
+  uint64_t full_commit_seq;  // don't write, wait for this seq to commit
+  uint64_t full_restart_seq; // start writing again with this seq
 
   int fd;
 
   // in journal
-  deque<pair<__u64, off64_t> > journalq;  // track seq offsets, so we can trim later.
+  deque<pair<uint64_t, off64_t> > journalq;  // track seq offsets, so we can trim later.
 
   // currently being journaled and awaiting callback.
   //  or, awaiting callback bc journal was full.
-  deque<__u64> writing_seq;
+  deque<uint64_t> writing_seq;
   deque<Context*> writing_fin;
 
   // waiting to be journaled
   struct write_item {
-    __u64 seq;
+    uint64_t seq;
     bufferlist bl;
     Context *fin;
-    write_item(__u64 s, bufferlist& b, Context *f) : seq(s), fin(f) { bl.claim(b); }
+    write_item(uint64_t s, bufferlist& b, Context *f) : seq(s), fin(f) { bl.claim(b); }
   };
   deque<write_item> writeq;
   
@@ -120,9 +120,9 @@ private:
   void stop_writer();
   void write_thread_entry();
 
-  int check_for_full(__u64 seq, off64_t pos, off64_t size);
-  int prepare_multi_write(bufferlist& bl, __u64& orig_ops, __u64& orig_bytee);
-  int prepare_single_write(bufferlist& bl, off64_t& queue_pos, __u64& orig_ops, __u64& orig_bytes);
+  int check_for_full(uint64_t seq, off64_t pos, off64_t size);
+  int prepare_multi_write(bufferlist& bl, uint64_t& orig_ops, uint64_t& orig_bytee);
+  int prepare_single_write(bufferlist& bl, off64_t& queue_pos, uint64_t& orig_ops, uint64_t& orig_bytes);
   void do_write(bufferlist& bl);
 
   void write_bl(off64_t& pos, bufferlist& bl);
@@ -143,7 +143,7 @@ private:
   }
 
  public:
-  FileJournal(__u64 fsid, Finisher *fin, Cond *sync_cond, const char *f, bool dio=false) : 
+  FileJournal(uint64_t fsid, Finisher *fin, Cond *sync_cond, const char *f, bool dio=false) : 
     Journal(fsid, fin, sync_cond), fn(f),
     zero_buf(NULL),
     max_size(0), block_size(0),
@@ -161,7 +161,7 @@ private:
   }
 
   int create();
-  int open(__u64 last_seq);
+  int open(uint64_t last_seq);
   void close();
 
   void flush();
@@ -174,14 +174,14 @@ private:
   void make_writeable();
 
   // writes
-  void submit_entry(__u64 seq, bufferlist& bl, Context *oncommit);  // submit an item
-  void committed_thru(__u64 seq);
+  void submit_entry(uint64_t seq, bufferlist& bl, Context *oncommit);  // submit an item
+  void committed_thru(uint64_t seq);
   bool is_full();
 
   void set_wait_on_full(bool b) { wait_on_full = b; }
 
   // reads
-  bool read_entry(bufferlist& bl, __u64& seq);
+  bool read_entry(bufferlist& bl, uint64_t& seq);
 };
 
 #endif
index 26c667a4dc2ee9aadbfb8428715bd7188a7cc874..1db470eb1f847be51d783dbd2039ccdc53768e6e 100644 (file)
@@ -626,7 +626,7 @@ int FileStore::mount()
     } else if (!btrfs) {
       dout(0) << "mount WARNING: not btrfs, store may be in inconsistent state" << dendl;
     } else {
-      __u64 cp = snaps.back();
+      uint64_t cp = snaps.back();
       btrfs_ioctl_vol_args snapargs;
 
       // drop current
@@ -665,7 +665,7 @@ int FileStore::mount()
   op_fd = ::open(current_op_seq_fn, O_CREAT|O_RDWR, 0644);
   assert(op_fd >= 0);
 
-  __u64 initial_op_seq = 0;
+  uint64_t initial_op_seq = 0;
   {
     char s[40];
     int l = ::read(op_fd, s, sizeof(s));
@@ -740,9 +740,9 @@ int FileStore::umount()
 
 /// -----------------------------
 
-void FileStore::queue_op(Sequencer *posr, __u64 op_seq, list<Transaction*>& tls, Context *onreadable, Context *onreadable_sync)
+void FileStore::queue_op(Sequencer *posr, uint64_t op_seq, list<Transaction*>& tls, Context *onreadable, Context *onreadable_sync)
 {
-  __u64 bytes = 0, ops = 0;
+  uint64_t bytes = 0, ops = 0;
   for (list<Transaction*>::iterator p = tls.begin();
        p != tls.end();
        p++) {
@@ -864,12 +864,12 @@ void FileStore::_finish_op(OpSequencer *osr)
 struct C_JournaledAhead : public Context {
   FileStore *fs;
   ObjectStore::Sequencer *osr;
-  __u64 op;
+  uint64_t op;
   list<ObjectStore::Transaction*> tls;
   Context *onreadable, *onreadable_sync;
   Context *ondisk;
 
-  C_JournaledAhead(FileStore *f, ObjectStore::Sequencer *os, __u64 o, list<ObjectStore::Transaction*>& t,
+  C_JournaledAhead(FileStore *f, ObjectStore::Sequencer *os, uint64_t o, list<ObjectStore::Transaction*>& t,
                   Context *onr, Context *ond, Context *onrsync) :
     fs(f), osr(os), op(o), tls(t), onreadable(onr), onreadable_sync(onrsync), ondisk(ond) { }
   void finish(int r) {
@@ -893,7 +893,7 @@ int FileStore::queue_transactions(Sequencer *osr, list<Transaction*> &tls,
 
       journal->throttle();
 
-      __u64 op = op_journal_start(0);
+      uint64_t op = op_journal_start(0);
       dout(10) << "queue_transactions (parallel) " << op << " " << tls << dendl;
       
       journal_transactions(tls, op, ondisk);
@@ -905,7 +905,7 @@ int FileStore::queue_transactions(Sequencer *osr, list<Transaction*> &tls,
       return 0;
     }
     else if (g_conf.filestore_journal_writeahead) {
-      __u64 op = op_journal_start(0);
+      uint64_t op = op_journal_start(0);
       dout(10) << "queue_transactions (writeahead) " << op << " " << tls << dendl;
       journal_transactions(tls, op,
                           new C_JournaledAhead(this, osr, op, tls, onreadable, ondisk, onreadable_sync));
@@ -914,7 +914,7 @@ int FileStore::queue_transactions(Sequencer *osr, list<Transaction*> &tls,
     }
   }
 
-  __u64 op_seq = op_apply_start(0);
+  uint64_t op_seq = op_apply_start(0);
   dout(10) << "queue_transactions (trailing journal) " << op_seq << " " << tls << dendl;
   int r = do_transactions(tls, op_seq);
   op_apply_finish();
@@ -938,7 +938,7 @@ int FileStore::queue_transactions(Sequencer *osr, list<Transaction*> &tls,
   return r;
 }
 
-void FileStore::_journaled_ahead(Sequencer *osr, __u64 op,
+void FileStore::_journaled_ahead(Sequencer *osr, uint64_t op,
                                 list<Transaction*> &tls,
                                 Context *onreadable, Context *ondisk,
                                 Context *onreadable_sync)
@@ -955,11 +955,11 @@ void FileStore::_journaled_ahead(Sequencer *osr, __u64 op,
   }
 }
 
-int FileStore::do_transactions(list<Transaction*> &tls, __u64 op_seq)
+int FileStore::do_transactions(list<Transaction*> &tls, uint64_t op_seq)
 {
   int r = 0;
 
-  __u64 bytes = 0, ops = 0;
+  uint64_t bytes = 0, ops = 0;
   for (list<Transaction*>::iterator p = tls.begin();
        p != tls.end();
        p++) {
@@ -1014,7 +1014,7 @@ unsigned FileStore::apply_transactions(list<Transaction*> &tls,
     my_lock.Unlock();
     dout(10) << "apply done r = " << r << dendl;
   } else {
-    __u64 op_seq = op_apply_start(0);
+    uint64_t op_seq = op_apply_start(0);
     r = do_transactions(tls, op_seq);
     op_apply_finish();
 
@@ -1032,7 +1032,7 @@ unsigned FileStore::apply_transactions(list<Transaction*> &tls,
 
 // btrfs transaction start/end interface
 
-int FileStore::_transaction_start(__u64 bytes, __u64 ops)
+int FileStore::_transaction_start(uint64_t bytes, uint64_t ops)
 {
 #ifdef DARWIN
   return 0;
@@ -1104,8 +1104,8 @@ unsigned FileStore::_do_transaction(Transaction& t)
       {
        coll_t cid = t.get_cid();
        sobject_t oid = t.get_oid();
-       __u64 off = t.get_length();
-       __u64 len = t.get_length();
+       uint64_t off = t.get_length();
+       uint64_t len = t.get_length();
        bufferlist bl;
        t.get_bl(bl);
        _write(cid, oid, off, len, bl);
@@ -1116,8 +1116,8 @@ unsigned FileStore::_do_transaction(Transaction& t)
       {
        coll_t cid = t.get_cid();
        sobject_t oid = t.get_oid();
-       __u64 off = t.get_length();
-       __u64 len = t.get_length();
+       uint64_t off = t.get_length();
+       uint64_t len = t.get_length();
        _zero(cid, oid, off, len);
       }
       break;
@@ -1126,8 +1126,8 @@ unsigned FileStore::_do_transaction(Transaction& t)
       {
        coll_t cid = t.get_cid();
        sobject_t oid = t.get_oid();
-       __u64 off = t.get_length();
-       __u64 len = t.get_length();
+       uint64_t off = t.get_length();
+       uint64_t len = t.get_length();
        trim_from_cache(cid, oid, off, len);
       }
       break;
@@ -1136,7 +1136,7 @@ unsigned FileStore::_do_transaction(Transaction& t)
       {
        coll_t cid = t.get_cid();
        sobject_t oid = t.get_oid();
-       __u64 off = t.get_length();
+       uint64_t off = t.get_length();
        _truncate(cid, oid, off);
       }
       break;
@@ -1201,8 +1201,8 @@ unsigned FileStore::_do_transaction(Transaction& t)
        coll_t cid = t.get_cid();
        sobject_t oid = t.get_oid();
        sobject_t noid = t.get_oid();
-       __u64 off = t.get_length();
-       __u64 len = t.get_length();
+       uint64_t off = t.get_length();
+       uint64_t len = t.get_length();
        _clone_range(cid, oid, noid, off, len);
       }
       break;
@@ -1295,7 +1295,7 @@ int FileStore::stat(coll_t cid, const sobject_t& oid, struct stat *st)
 }
 
 int FileStore::read(coll_t cid, const sobject_t& oid, 
-                    __u64 offset, size_t len,
+                    uint64_t offset, size_t len,
                     bufferlist& bl) {
   char fn[PATH_MAX];
   get_coname(cid, oid, fn, sizeof(fn));
@@ -1309,7 +1309,7 @@ int FileStore::read(coll_t cid, const sobject_t& oid,
     dout(10) << "read couldn't open " << fn << " errno " << errno << " " << strerror_r(errno, buf, sizeof(buf)) << dendl;
     r = -errno;
   } else {
-    __u64 actual = ::lseek64(fd, offset, SEEK_SET);
+    uint64_t actual = ::lseek64(fd, offset, SEEK_SET);
     size_t got = 0;
     
     if (len == 0) {
@@ -1344,7 +1344,7 @@ int FileStore::_remove(coll_t cid, const sobject_t& oid)
   return r;
 }
 
-int FileStore::_truncate(coll_t cid, const sobject_t& oid, __u64 size)
+int FileStore::_truncate(coll_t cid, const sobject_t& oid, uint64_t size)
 {
   char fn[PATH_MAX];
   get_coname(cid, oid, fn, sizeof(fn));
@@ -1376,7 +1376,7 @@ int FileStore::_touch(coll_t cid, const sobject_t& oid)
 }
 
 int FileStore::_write(coll_t cid, const sobject_t& oid, 
-                     __u64 offset, size_t len,
+                     uint64_t offset, size_t len,
                      const bufferlist& bl)
 {
   char fn[PATH_MAX];
@@ -1394,7 +1394,7 @@ int FileStore::_write(coll_t cid, const sobject_t& oid,
   } else {
     
     // seek
-    __u64 actual = ::lseek64(fd, offset, SEEK_SET);
+    uint64_t actual = ::lseek64(fd, offset, SEEK_SET);
     int did = 0;
     assert(actual == offset);
     
@@ -1431,7 +1431,7 @@ int FileStore::_write(coll_t cid, const sobject_t& oid,
   return r;
 }
 
-int FileStore::_zero(coll_t cid, const sobject_t& oid, __u64 offset, size_t len)
+int FileStore::_zero(coll_t cid, const sobject_t& oid, uint64_t offset, size_t len)
 {
   // write zeros.. yuck!
   bufferptr bp(len);
@@ -1482,7 +1482,7 @@ int FileStore::_clone(coll_t cid, const sobject_t& oldoid, const sobject_t& newo
   return 0;
 }
 
-int FileStore::_do_clone_range(int from, int to, __u64 off, __u64 len)
+int FileStore::_do_clone_range(int from, int to, uint64_t off, uint64_t len)
 {
   dout(20) << "_do_clone_range " << off << "~" << len << dendl;
   int r = 0;
@@ -1522,7 +1522,7 @@ int FileStore::_do_clone_range(int from, int to, __u64 off, __u64 len)
   return r;
 }
 
-int FileStore::_clone_range(coll_t cid, const sobject_t& oldoid, const sobject_t& newoid, __u64 off, __u64 len)
+int FileStore::_clone_range(coll_t cid, const sobject_t& oldoid, const sobject_t& newoid, uint64_t off, uint64_t len)
 {
   char ofn[PATH_MAX], nfn[PATH_MAX];
   get_coname(cid, oldoid, ofn, sizeof(ofn));
@@ -1552,7 +1552,7 @@ int FileStore::_clone_range(coll_t cid, const sobject_t& oldoid, const sobject_t
 }
 
 
-bool FileStore::queue_flusher(int fd, __u64 off, __u64 len)
+bool FileStore::queue_flusher(int fd, uint64_t off, uint64_t len)
 {
   bool queued;
   lock.Lock();
@@ -1585,20 +1585,20 @@ void FileStore::flusher_entry()
   while (true) {
     if (!flusher_queue.empty()) {
 #ifdef HAVE_SYNC_FILE_RANGE
-      list<__u64> q;
+      list<uint64_t> q;
       q.swap(flusher_queue);
 
       int num = flusher_queue_len;  // see how many we're taking, here
 
       lock.Unlock();
       while (!q.empty()) {
-       __u64 ep = q.front();
+       uint64_t ep = q.front();
        q.pop_front();
        int fd = q.front();
        q.pop_front();
-       __u64 off = q.front();
+       uint64_t off = q.front();
        q.pop_front();
-       __u64 len = q.front();
+       uint64_t len = q.front();
        q.pop_front();
        if (!stop && ep == sync_epoch) {
          dout(10) << "flusher_entry flushing+closing " << fd << " ep " << ep << dendl;
@@ -1654,7 +1654,7 @@ void FileStore::sync_entry()
     
     if (commit_start()) {
       utime_t start = g_clock.now();
-      __u64 cp = op_seq;
+      uint64_t cp = op_seq;
 
       // make flusher stop flushing previously queued stuff
       sync_epoch++;
index 88a2980067df83786043ed8a94dc9183dd1fd5f4..a12d701aedfd8b4e9e24d49a0b143c3aaa2d1152 100644 (file)
@@ -41,7 +41,7 @@ class FileStore : public JournalingObjectStore {
   string basedir, journalpath;
   char current_fn[PATH_MAX];
   char current_op_seq_fn[PATH_MAX];
-  __u64 fsid;
+  uint64_t fsid;
   
   bool btrfs;
   bool btrfs_trans_start_end;
@@ -51,7 +51,7 @@ class FileStore : public JournalingObjectStore {
   int fsid_fd, op_fd;
 
   int basedir_fd, current_fd;
-  deque<__u64> snaps;
+  deque<uint64_t> snaps;
 
   // fake attrs?
   FakeAttrs attrs;
@@ -76,7 +76,7 @@ class FileStore : public JournalingObjectStore {
   // sync thread
   Mutex lock;
   Cond sync_cond;
-  __u64 sync_epoch;
+  uint64_t sync_epoch;
   bool stop;
   void sync_entry();
   struct SyncThread : public Thread {
@@ -92,10 +92,10 @@ class FileStore : public JournalingObjectStore {
 
   // -- op workqueue --
   struct Op {
-    __u64 op;
+    uint64_t op;
     list<Transaction*> tls;
     Context *onreadable, *onreadable_sync;
-    __u64 ops, bytes;
+    uint64_t ops, bytes;
   };
   struct OpSequencer {
     Sequencer *parent;
@@ -105,11 +105,11 @@ class FileStore : public JournalingObjectStore {
   };
   Sequencer default_osr;
   deque<OpSequencer*> op_queue;
-  __u64 op_queue_len, op_queue_bytes;
+  uint64_t op_queue_len, op_queue_bytes;
   Cond op_throttle_cond;
   Finisher op_finisher;
-  __u64 next_finish;
-  map<__u64, pair<Context*,Context*> > finish_queue;
+  uint64_t next_finish;
+  map<uint64_t, pair<Context*,Context*> > finish_queue;
 
   ThreadPool op_tp;
   struct OpWQ : public ThreadPool::WorkQueue<OpSequencer> {
@@ -148,14 +148,14 @@ class FileStore : public JournalingObjectStore {
 
   void _do_op(OpSequencer *o);
   void _finish_op(OpSequencer *o);
-  void queue_op(Sequencer *osr, __u64 op, list<Transaction*>& tls, Context *onreadable, Context *onreadable_sync);
-  void _journaled_ahead(Sequencer *osr, __u64 op, list<Transaction*> &tls,
+  void queue_op(Sequencer *osr, uint64_t op, list<Transaction*>& tls, Context *onreadable, Context *onreadable_sync);
+  void _journaled_ahead(Sequencer *osr, uint64_t op, list<Transaction*> &tls,
                        Context *onreadable, Context *ondisk, Context *onreadable_sync);
   friend class C_JournaledAhead;
 
   // flusher thread
   Cond flusher_cond;
-  list<__u64> flusher_queue;
+  list<uint64_t> flusher_queue;
   int flusher_queue_len;
   void flusher_entry();
   struct FlusherThread : public Thread {
@@ -166,7 +166,7 @@ class FileStore : public JournalingObjectStore {
       return 0;
     }
   } flusher_thread;
-  bool queue_flusher(int fd, __u64 off, __u64 len);
+  bool queue_flusher(int fd, uint64_t off, uint64_t len);
 
   int open_journal();
 
@@ -201,10 +201,10 @@ class FileStore : public JournalingObjectStore {
 
   int statfs(struct statfs *buf);
 
-  int do_transactions(list<Transaction*> &tls, __u64 op_seq);
+  int do_transactions(list<Transaction*> &tls, uint64_t op_seq);
   unsigned apply_transaction(Transaction& t, Context *ondisk=0);
   unsigned apply_transactions(list<Transaction*>& tls, Context *ondisk=0);
-  int _transaction_start(__u64 bytes, __u64 ops);
+  int _transaction_start(uint64_t bytes, uint64_t ops);
   void _transaction_finish(int id);
   unsigned _do_transaction(Transaction& t);
 
@@ -219,15 +219,15 @@ class FileStore : public JournalingObjectStore {
   }
   bool exists(coll_t cid, const sobject_t& oid);
   int stat(coll_t cid, const sobject_t& oid, struct stat *st);
-  int read(coll_t cid, const sobject_t& oid, __u64 offset, size_t len, bufferlist& bl);
+  int read(coll_t cid, const sobject_t& oid, uint64_t offset, size_t len, bufferlist& bl);
 
   int _touch(coll_t cid, const sobject_t& oid);
-  int _write(coll_t cid, const sobject_t& oid, __u64 offset, size_t len, const bufferlist& bl);
-  int _zero(coll_t cid, const sobject_t& oid, __u64 offset, size_t len);
-  int _truncate(coll_t cid, const sobject_t& oid, __u64 size);
+  int _write(coll_t cid, const sobject_t& oid, uint64_t offset, size_t len, const bufferlist& bl);
+  int _zero(coll_t cid, const sobject_t& oid, uint64_t offset, size_t len);
+  int _truncate(coll_t cid, const sobject_t& oid, uint64_t size);
   int _clone(coll_t cid, const sobject_t& oldoid, const sobject_t& newoid);
-  int _clone_range(coll_t cid, const sobject_t& oldoid, const sobject_t& newoid, __u64 off, __u64 len);
-  int _do_clone_range(int from, int to, __u64 off, __u64 len);
+  int _clone_range(coll_t cid, const sobject_t& oldoid, const sobject_t& newoid, uint64_t off, uint64_t len);
+  int _do_clone_range(int from, int to, uint64_t off, uint64_t len);
   int _remove(coll_t cid, const sobject_t& oid);
 
   void _start_sync();
@@ -272,8 +272,8 @@ class FileStore : public JournalingObjectStore {
   int _collection_add(coll_t c, coll_t ocid, const sobject_t& o);
   int _collection_remove(coll_t c, const sobject_t& o);
 
-  void trim_from_cache(coll_t cid, const sobject_t& oid, __u64 offset, size_t len) {}
-  int is_cached(coll_t cid, const sobject_t& oid, __u64 offset, size_t len) { return -1; }
+  void trim_from_cache(coll_t cid, const sobject_t& oid, uint64_t offset, size_t len) {}
+  int is_cached(coll_t cid, const sobject_t& oid, uint64_t offset, size_t len) { return -1; }
 };
 
 #endif
index 4b2051303c71a9074b1f266f40b0599537a6815c..67ef8863102f68a91cc6b3fa76c4b2bac3d263fa 100644 (file)
 
 class Journal {
 protected:
-  __u64 fsid;
+  uint64_t fsid;
   Finisher *finisher;
   Cond *do_sync_cond;
   bool wait_on_full;
 
 public:
-  Journal(__u64 f, Finisher *fin, Cond *c=0) : fsid(f), finisher(fin),
+  Journal(uint64_t f, Finisher *fin, Cond *c=0) : fsid(f), finisher(fin),
                                               do_sync_cond(c),
                                               wait_on_full(false) { }
   virtual ~Journal() { }
 
   virtual int create() = 0;
-  virtual int open(__u64 last_seq) = 0;
+  virtual int open(uint64_t last_seq) = 0;
   virtual void close() = 0;
 
   virtual void flush() = 0;
@@ -45,9 +45,9 @@ public:
   // writes
   virtual bool is_writeable() = 0;
   virtual void make_writeable() = 0;
-  virtual void submit_entry(__u64 seq, bufferlist& e, Context *oncommit) = 0;
-  virtual void committed_thru(__u64 seq) = 0;
-  virtual bool read_entry(bufferlist& bl, __u64 &seq) = 0;
+  virtual void submit_entry(uint64_t seq, bufferlist& e, Context *oncommit) = 0;
+  virtual void committed_thru(uint64_t seq) = 0;
+  virtual bool read_entry(bufferlist& bl, uint64_t &seq) = 0;
 
   // reads/recovery
   
index 7203d7826ce2ce9d63b107a7e7ba49f0a8a71aec..097cfd393d87f4a19633bb845bb8b336875286d5 100644 (file)
@@ -26,7 +26,7 @@ void JournalingObjectStore::journal_stop()
   }
 }
 
-int JournalingObjectStore::journal_replay(__u64 fs_op_seq)
+int JournalingObjectStore::journal_replay(uint64_t fs_op_seq)
 {
   dout(10) << "journal_replay fs op_seq " << fs_op_seq << dendl;
   op_seq = fs_op_seq;
@@ -47,7 +47,7 @@ int JournalingObjectStore::journal_replay(__u64 fs_op_seq)
   int count = 0;
   while (1) {
     bufferlist bl;
-    __u64 seq = op_seq + 1;
+    uint64_t seq = op_seq + 1;
     if (!journal->read_entry(bl, seq)) {
       dout(3) << "journal_replay: end of journal, done." << dendl;
       break;
@@ -88,7 +88,7 @@ int JournalingObjectStore::journal_replay(__u64 fs_op_seq)
 
 // ------------------------------------
 
-__u64 JournalingObjectStore::op_apply_start(__u64 op) 
+uint64_t JournalingObjectStore::op_apply_start(uint64_t op) 
 {
   lock.Lock();
   while (blocked) {
@@ -114,7 +114,7 @@ void JournalingObjectStore::op_apply_finish()
   lock.Unlock();
 }
 
-__u64 JournalingObjectStore::op_journal_start(__u64 op)
+uint64_t JournalingObjectStore::op_journal_start(uint64_t op)
 {
   journal_lock.Lock();
   if (!op) {
@@ -183,7 +183,7 @@ void JournalingObjectStore::commit_finish()
   }
 }
 
-void JournalingObjectStore::journal_transaction(ObjectStore::Transaction& t, __u64 op,
+void JournalingObjectStore::journal_transaction(ObjectStore::Transaction& t, uint64_t op,
                                                Context *onjournal)
 {
   Mutex::Locker l(lock);
@@ -196,7 +196,7 @@ void JournalingObjectStore::journal_transaction(ObjectStore::Transaction& t, __u
     commit_waiters[op].push_back(onjournal);
 }
 
-void JournalingObjectStore::journal_transactions(list<ObjectStore::Transaction*>& tls, __u64 op,
+void JournalingObjectStore::journal_transactions(list<ObjectStore::Transaction*>& tls, uint64_t op,
                                                 Context *onjournal)
 {
   Mutex::Locker l(lock);
index 047610939852c18a75576244238d9d3657563b1a..79a82c3716bc2196e08b7a7d11b6ccfccd2ddc94 100644 (file)
@@ -21,8 +21,8 @@
 
 class JournalingObjectStore : public ObjectStore {
 protected:
-  __u64 op_seq, applied_seq;
-  __u64 committing_seq, committed_seq;
+  uint64_t op_seq, applied_seq;
+  uint64_t committing_seq, committed_seq;
   map<version_t, vector<Context*> > commit_waiters;
 
   int open_ops;
@@ -38,16 +38,16 @@ protected:
 protected:
   void journal_start();
   void journal_stop();
-  int journal_replay(__u64 fs_op_seq);
+  int journal_replay(uint64_t fs_op_seq);
 
   // --
-  __u64 op_apply_start(__u64 op);
+  uint64_t op_apply_start(uint64_t op);
   void op_apply_finish();
-  __u64 op_journal_start(__u64 op);
+  uint64_t op_journal_start(uint64_t op);
   void op_journal_finish();
 
-  void journal_transaction(ObjectStore::Transaction& t, __u64 op, Context *onjournal);
-  void journal_transactions(list<ObjectStore::Transaction*>& tls, __u64 op, Context *onjournal);
+  void journal_transaction(ObjectStore::Transaction& t, uint64_t op, Context *onjournal);
+  void journal_transactions(list<ObjectStore::Transaction*>& tls, uint64_t op, Context *onjournal);
 
   bool commit_start();
   void commit_started();  // allow new ops (underlying fs should now be committing all prior ops)
index 2830380bff979c66c7af913c3d3e2f02254ecb27..2f1131915d1f83c558dab3ca3739da1ccf501a01 100644 (file)
@@ -40,7 +40,7 @@ using std::vector;
 # define MIN(a,b) ((a) < (b) ? (a):(b))
 #endif
 
-typedef __u64 collection_list_handle_t;
+typedef uint64_t collection_list_handle_t;
 
 /*
  * low-level interface to the local OSD file system
@@ -114,7 +114,7 @@ public:
     static const int OP_RMATTRS =      28;  // cid, oid
 
   private:
-    __u64 ops, bytes;
+    uint64_t ops, bytes;
     bufferlist tbl;
     bufferlist::iterator p;
 
@@ -135,9 +135,9 @@ public:
     unsigned opp, blp, oidp, cidp, lengthp, attrnamep, attrsetp;
 
   public:
-    __u64 get_num_bytes() {
+    uint64_t get_num_bytes() {
       if (old) {
-       __u64 s = 16384 +
+       uint64_t s = 16384 +
          (opvec.size() + oids.size() + cids.size() + lengths.size()) * 4096;
        for (vector<bufferlist>::iterator p = bls.begin(); p != bls.end(); p++)
          s += bls.size() + 4096;
@@ -200,12 +200,12 @@ public:
       ::decode(c, p);
       return c;
     }
-    __u64 get_length() {
+    uint64_t get_length() {
       if (old)
        return lengths[lengthp++];
       if (p.get_off() == 0)
        p = tbl.begin();
-      __u64 len;
+      uint64_t len;
       ::decode(len, p);
       return len;
     }
@@ -242,7 +242,7 @@ public:
       ::encode(oid, tbl);
       ops++;
     }
-    void write(coll_t cid, const sobject_t& oid, __u64 off, __u64 len, const bufferlist& data) {
+    void write(coll_t cid, const sobject_t& oid, uint64_t off, uint64_t len, const bufferlist& data) {
       __u32 op = OP_WRITE;
       ::encode(op, tbl);
       ::encode(cid, tbl);
@@ -252,7 +252,7 @@ public:
       ::encode(data, tbl);
       ops++;
     }
-    void zero(coll_t cid, const sobject_t& oid, __u64 off, __u64 len) {
+    void zero(coll_t cid, const sobject_t& oid, uint64_t off, uint64_t len) {
       __u32 op = OP_ZERO;
       ::encode(op, tbl);
       ::encode(cid, tbl);
@@ -261,7 +261,7 @@ public:
       ::encode(len, tbl);
       ops++;
     }
-    void trim_from_cache(coll_t cid, const sobject_t& oid, __u64 off, __u64 len) {
+    void trim_from_cache(coll_t cid, const sobject_t& oid, uint64_t off, uint64_t len) {
       __u32 op = OP_TRIMCACHE;
        ::encode(op, tbl);
       ::encode(cid, tbl);
@@ -270,7 +270,7 @@ public:
       ::encode(len, tbl);
       ops++;
     }
-    void truncate(coll_t cid, const sobject_t& oid, __u64 off) {
+    void truncate(coll_t cid, const sobject_t& oid, uint64_t off) {
       __u32 op = OP_TRUNCATE;
       ::encode(op, tbl);
       ::encode(cid, tbl);
@@ -339,7 +339,7 @@ public:
       ::encode(noid, tbl);
       ops++;
     }
-    void clone_range(coll_t cid, const sobject_t& oid, sobject_t noid, __u64 off, __u64 len) {
+    void clone_range(coll_t cid, const sobject_t& oid, sobject_t noid, uint64_t off, uint64_t len) {
       __u32 op = OP_CLONERANGE;
       ::encode(op, tbl);
       ::encode(cid, tbl);
@@ -503,13 +503,13 @@ public:
   // objects
   virtual bool exists(coll_t cid, const sobject_t& oid) = 0;                   // useful?
   virtual int stat(coll_t cid, const sobject_t& oid, struct stat *st) = 0;     // struct stat?
-  virtual int read(coll_t cid, const sobject_t& oid, __u64 offset, size_t len, bufferlist& bl) = 0;
+  virtual int read(coll_t cid, const sobject_t& oid, uint64_t offset, size_t len, bufferlist& bl) = 0;
 
   /*
   virtual int _remove(coll_t cid, sobject_t oid) = 0;
-  virtual int _truncate(coll_t cid, sobject_t oid, __u64 size) = 0;
-  virtual int _write(coll_t cid, sobject_t oid, __u64 offset, size_t len, const bufferlist& bl) = 0;
-  virtual int _zero(coll_t cid, sobject_t oid, __u64 offset, size_t len) {
+  virtual int _truncate(coll_t cid, sobject_t oid, uint64_t size) = 0;
+  virtual int _write(coll_t cid, sobject_t oid, uint64_t offset, size_t len, const bufferlist& bl) = 0;
+  virtual int _zero(coll_t cid, sobject_t oid, uint64_t offset, size_t len) {
     // write zeros.. yuck!
     bufferptr bp(len);
     bufferlist bl;
@@ -518,8 +518,8 @@ public:
   }
   */
 
-  virtual void trim_from_cache(coll_t cid, const sobject_t& oid, __u64 offset, size_t len) = 0; //{ }
-  virtual int is_cached(coll_t cid, const sobject_t& oid, __u64 offset, size_t len) = 0;  //{ return -1; }
+  virtual void trim_from_cache(coll_t cid, const sobject_t& oid, uint64_t offset, size_t len) = 0; //{ }
+  virtual int is_cached(coll_t cid, const sobject_t& oid, uint64_t offset, size_t len) = 0;  //{ return -1; }
 
   virtual int getattr(coll_t cid, const sobject_t& oid, const char *name, void *value, size_t size) = 0;
   virtual int getattr(coll_t cid, const sobject_t& oid, const char *name, bufferptr& value) = 0;
index bc49914475ebbebc5271f3d26d486d730610178d..a514adfa45f2f66f3c30ac293522b81bd07ee567 100644 (file)
 
 /* this should be 4k */
 struct btrfs_ioctl_vol_args {
-       __s64 fd;
+       int64_t fd;
        char name[BTRFS_PATH_NAME_MAX + 1];
 };
 
 struct btrfs_ioctl_clone_range_args {
-  __s64 src_fd;
-  __u64 src_offset, src_length;
-  __u64 dest_offset;
+  int64_t src_fd;
+  uint64_t src_offset, src_length;
+  uint64_t dest_offset;
 };
 
 #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
index fc29989644926ce5ba00c45ad2798e79e7c95e35..e0cb14a669bae0fc1c5de36732dfcee9e96366bd 100644 (file)
@@ -1702,7 +1702,7 @@ bool OSD::ms_verify_authorizer(Connection *con, int peer_type,
   AuthCapsInfo caps_info;
   EntityName name;
   uint64_t global_id;
-  __u64 auid;
+  uint64_t auid;
 
   isvalid = authorize_handler->verify_authorizer(monc->rotating_secrets,
                                                 authorizer_data, authorizer_reply, name, global_id, caps_info, &auid);
index b88dbe4088234ba0f3425184f803c33920252d37..61b5ef78588b95ff8be7ec787b789bcdf6b067b4 100644 (file)
@@ -191,7 +191,7 @@ do { \
  * on the pool, check if you're the pool owner and grant full.
  * Otherwise, you get nothing.
  */
-int OSDCaps::get_pool_cap(int pool_id, __u64 uid)
+int OSDCaps::get_pool_cap(int pool_id, uint64_t uid)
 {
   if (allow_all)
     return OSD_POOL_CAP_ALL;
index f01015e3f420a38193fbde356dace73a6bd2117a..d84a4f34406bf5b5e3b37d62b864891f86294427 100644 (file)
@@ -62,7 +62,7 @@ struct OSDCaps {
   rwx_t default_action;
   bool allow_all;
   int peer_type;
-  __u64 auid;
+  uint64_t auid;
 
   bool get_next_token(string s, size_t& pos, string& token);
   bool is_rwx(string& token, rwx_t& cap_val);
@@ -70,13 +70,13 @@ struct OSDCaps {
   OSDCaps() : default_action(0), allow_all(false),
              auid(CEPH_AUTH_UID_DEFAULT) {}
   bool parse(bufferlist::iterator& iter);
-  int get_pool_cap(int pool_id, __u64 uid = CEPH_AUTH_UID_DEFAULT);
+  int get_pool_cap(int pool_id, uint64_t uid = CEPH_AUTH_UID_DEFAULT);
   bool is_mon() { return CEPH_ENTITY_TYPE_MON == peer_type; }
   bool is_osd() { return CEPH_ENTITY_TYPE_OSD == peer_type; }
   bool is_mds() { return CEPH_ENTITY_TYPE_MDS == peer_type; }
   void set_allow_all(bool allow) { allow_all = allow; }
   void set_peer_type (int pt) { peer_type = pt; }
-  void set_auid(__u64 uid) { auid = uid; }
+  void set_auid(uint64_t uid) { auid = uid; }
 };
 
 static inline ostream& operator<<(ostream& out, const OSDCaps& c) {
index bd9689d63da442bf00adf48f0780239d97625b22..d920492460f7b17b4b0dfd2af3d5671f6031e07a 100644 (file)
@@ -1998,9 +1998,9 @@ void PG::write_log(ObjectStore::Transaction& t)
   for (list<Log::Entry>::iterator p = log.log.begin();
        p != log.log.end();
        p++) {
-    __u64 startoff = bl.length();
+    uint64_t startoff = bl.length();
     ::encode(*p, bl);
-    __u64 endoff = bl.length();
+    uint64_t endoff = bl.length();
     if (startoff / 4096 != endoff / 4096) {
       // we reached a new block. *p was the last entry with bytes in previous block
       ondisklog.block_map[startoff] = p->version;
@@ -2043,7 +2043,7 @@ void PG::trim_ondisklog_to(ObjectStore::Transaction& t, eversion_t v)
 {
   dout(15) << "trim_ondisk_log_to v " << v << dendl;
 
-  map<__u64,eversion_t>::iterator p = ondisklog.block_map.begin();
+  map<uint64_t,eversion_t>::iterator p = ondisklog.block_map.begin();
   while (p != ondisklog.block_map.end()) {
     //dout(15) << "    " << p->first << " -> " << p->second << dendl;
     p++;
@@ -2058,7 +2058,7 @@ void PG::trim_ondisklog_to(ObjectStore::Transaction& t, eversion_t v)
     return;  // can't trim anything!
   
   // we can trim!
-  __u64 trim = p->first;
+  uint64_t trim = p->first;
   dout(10) << "  " << ondisklog.tail << "~" << ondisklog.length()
           << " -> " << trim << "~" << (ondisklog.head-trim)
           << dendl;
@@ -2160,7 +2160,7 @@ void PG::read_log(ObjectStore *store)
     eversion_t last;
     bool reorder = false;
     while (!p.end()) {
-      __u64 pos = ondisklog.tail + p.get_off();
+      uint64_t pos = ondisklog.tail + p.get_off();
       ::decode(e, p);
       dout(20) << "read_log " << pos << " " << e << dendl;
 
@@ -2185,7 +2185,7 @@ void PG::read_log(ObjectStore *store)
        osd->get_logclient()->log(LOG_ERROR, ss);
       }
       
-      __u64 endpos = ondisklog.tail + p.get_off();
+      uint64_t endpos = ondisklog.tail + p.get_off();
       if (endpos / 4096 != pos / 4096)
        ondisklog.block_map[pos] = e.version;  // last event in prior block
       log.log.push_back(e);
index 77d0d8c73418f36de8b80a19f1356117d485a11d..ae2e842a07537aa8523fd09c25d69873236d1392 100644 (file)
@@ -458,13 +458,13 @@ public:
   class OndiskLog {
   public:
     // ok
-    __u64 tail;                     // first byte of log. 
-    __u64 head;                        // byte following end of log.
-    map<__u64,eversion_t> block_map;  // offset->version of _last_ entry with _any_ bytes in each block
+    uint64_t tail;                     // first byte of log. 
+    uint64_t head;                        // byte following end of log.
+    map<uint64_t,eversion_t> block_map;  // offset->version of _last_ entry with _any_ bytes in each block
 
     OndiskLog() : tail(0), head(0) {}
 
-    __u64 length() { return head - tail; }
+    uint64_t length() { return head - tail; }
     bool trim_to(eversion_t v, ObjectStore::Transaction& t);
 
     void encode(bufferlist& bl) const {
index a36c50f43a7363bccb2cc895b7641ddd2252bde1..c5b9ca99ad2d8fc24a675a653b16788f41cb951c 100644 (file)
@@ -10,11 +10,11 @@ struct PGLSResponse {
   list<object_t> entries;
 
   void encode(bufferlist& bl) const {
-    ::encode((__u64)handle, bl);
+    ::encode((uint64_t)handle, bl);
     ::encode(entries, bl);
   }
   void decode(bufferlist::iterator& bl) {
-    __u64 tmp;
+    uint64_t tmp;
     ::decode(tmp, bl);
     handle = (collection_list_handle_t)tmp;
     ::decode(entries, bl);
index f196701fe9d63b1fd1ad6278aeb57e4db9e52b7f..187d7477f154535b3e9f7c24a494d4f3e0a8eb1d 100644 (file)
@@ -388,7 +388,7 @@ void ReplicatedPG::do_pg_op(MOSDOp *op)
         dout(10) << " pgls pg=" << op->get_pg() << dendl;
        // read into a buffer
         PGLSResponse response;
-        response.handle = (collection_list_handle_t)(__u64)(p->op.pgls.cookie);
+        response.handle = (collection_list_handle_t)(uint64_t)(p->op.pgls.cookie);
         vector<sobject_t> sentries;
        result = osd->store->collection_list_partial(coll_t::build_pg_coll(info.pgid), snapid,
                                                     sentries, p->op.pgls.count,
@@ -571,7 +571,7 @@ void ReplicatedPG::do_op(MOSDOp *op)
   // note some basic context for op replication that prepare_transaction may clobber
   eversion_t old_last_update = ctx->at_version;
   bool old_exists = obc->obs.exists;
-  __u64 old_size = obc->obs.oi.size;
+  uint64_t old_size = obc->obs.oi.size;
   eversion_t old_version = obc->obs.oi.version;
 
   // we are acker.
@@ -783,7 +783,7 @@ bool ReplicatedPG::snap_trimmer()
        if (p != snapset.clones.begin()) {
          // not the oldest... merge overlap into next older clone
          vector<snapid_t>::iterator n = p - 1;
-         interval_set<__u64> keep;
+         interval_set<uint64_t> keep;
          keep.union_of(snapset.clone_overlap[*n], snapset.clone_overlap[*p]);
          add_interval_usage(keep, info.stats);  // not deallocated
          snapset.clone_overlap[*n].intersection_of(snapset.clone_overlap[*p]);
@@ -993,7 +993,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops,
        memset(&st, 0, sizeof(st));
        result = osd->store->stat(coll_t::build_pg_coll(info.pgid), soid, &st);
        if (result >= 0) {
-         __u64 size = st.st_size;
+         uint64_t size = st.st_size;
          ::encode(size, odata);
          ::encode(oi.mtime, odata);
        }
@@ -1066,7 +1066,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops,
         }
        if (ssc->snapset.clones.size()) {
          snapid_t newest = *ssc->snapset.clones.rbegin();
-         interval_set<__u64> ch;
+         interval_set<uint64_t> ch;
          if (op.extent.length)
            ch.insert(op.extent.offset, op.extent.length);
          ch.intersection_of(ssc->snapset.clone_overlap[newest]);
@@ -1074,7 +1074,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops,
          add_interval_usage(ch, info.stats);
        }
        if (op.extent.length && (op.extent.offset + op.extent.length > oi.size)) {
-         __u64 new_size = op.extent.offset + op.extent.length;
+         uint64_t new_size = op.extent.offset + op.extent.length;
          info.stats.num_bytes += new_size - oi.size;
          info.stats.num_kb += SHIFT_ROUND_UP(new_size, 10) - SHIFT_ROUND_UP(oi.size, 10);
          oi.size = new_size;
@@ -1118,7 +1118,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops,
        t.zero(coll_t::build_pg_coll(info.pgid), soid, op.extent.offset, op.extent.length);
        if (ssc->snapset.clones.size()) {
          snapid_t newest = *ssc->snapset.clones.rbegin();
-         interval_set<__u64> ch;
+         interval_set<uint64_t> ch;
          ch.insert(op.extent.offset, op.extent.length);
          ch.intersection_of(ssc->snapset.clone_overlap[newest]);
          ssc->snapset.clone_overlap[newest].subtract(ch);
@@ -1167,13 +1167,13 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops,
        t.truncate(coll_t::build_pg_coll(info.pgid), soid, op.extent.offset);
        if (ssc->snapset.clones.size()) {
          snapid_t newest = *ssc->snapset.clones.rbegin();
-         interval_set<__u64> trim;
+         interval_set<uint64_t> trim;
          if (oi.size > op.extent.offset) {
            trim.insert(op.extent.offset, oi.size-op.extent.offset);
            trim.intersection_of(ssc->snapset.clone_overlap[newest]);
            add_interval_usage(trim, info.stats);
          }
-         interval_set<__u64> keep;
+         interval_set<uint64_t> keep;
          if (op.extent.offset)
            keep.insert(0, op.extent.offset);
          ssc->snapset.clone_overlap[newest].intersection_of(keep);
@@ -1617,9 +1617,9 @@ void ReplicatedPG::make_writeable(OpContext *ctx)
 }
 
 
-void ReplicatedPG::add_interval_usage(interval_set<__u64>& s, pg_stat_t& stats)
+void ReplicatedPG::add_interval_usage(interval_set<uint64_t>& s, pg_stat_t& stats)
 {
-  for (map<__u64,__u64>::iterator p = s.m.begin(); p != s.m.end(); p++) {
+  for (map<uint64_t,uint64_t>::iterator p = s.m.begin(); p != s.m.end(); p++) {
     stats.num_bytes += p->second;
     stats.num_kb += SHIFT_ROUND_UP(p->first+p->second, 10) - (p->first >> 10);
   }
@@ -1943,7 +1943,7 @@ void ReplicatedPG::eval_repop(RepGather *repop)
 
 
 void ReplicatedPG::issue_repop(RepGather *repop, int dest, utime_t now,
-                              bool old_exists, __u64 old_size, eversion_t old_version)
+                              bool old_exists, uint64_t old_size, eversion_t old_version)
 {
   const sobject_t& soid = repop->ctx->obs->oi.soid;
   dout(7) << " issue_repop rep_tid " << repop->rep_tid
@@ -2532,8 +2532,8 @@ void ReplicatedPG::sub_op_modify_reply(MOSDSubOpReply *r)
 
 void ReplicatedPG::calc_head_subsets(SnapSet& snapset, const sobject_t& head,
                                     Missing& missing,
-                                    interval_set<__u64>& data_subset,
-                                    map<sobject_t, interval_set<__u64> >& clone_subsets)
+                                    interval_set<uint64_t>& data_subset,
+                                    map<sobject_t, interval_set<uint64_t> >& clone_subsets)
 {
   dout(10) << "calc_head_subsets " << head
           << " clone_overlap " << snapset.clone_overlap << dendl;
@@ -2541,8 +2541,8 @@ void ReplicatedPG::calc_head_subsets(SnapSet& snapset, const sobject_t& head,
   struct stat st;
   osd->store->stat(coll_t::build_pg_coll(info.pgid), head, &st);
 
-  interval_set<__u64> cloning;
-  interval_set<__u64> prev;
+  interval_set<uint64_t> cloning;
+  interval_set<uint64_t> prev;
   if (st.st_size)
     prev.insert(0, st.st_size);    
   
@@ -2573,13 +2573,13 @@ void ReplicatedPG::calc_head_subsets(SnapSet& snapset, const sobject_t& head,
 
 void ReplicatedPG::calc_clone_subsets(SnapSet& snapset, const sobject_t& soid,
                                      Missing& missing,
-                                     interval_set<__u64>& data_subset,
-                                     map<sobject_t, interval_set<__u64> >& clone_subsets)
+                                     interval_set<uint64_t>& data_subset,
+                                     map<sobject_t, interval_set<uint64_t> >& clone_subsets)
 {
   dout(10) << "calc_clone_subsets " << soid
           << " clone_overlap " << snapset.clone_overlap << dendl;
 
-  __u64 size = snapset.clone_size[soid.snap];
+  uint64_t size = snapset.clone_size[soid.snap];
 
   unsigned i;
   for (i=0; i < snapset.clones.size(); i++)
@@ -2587,8 +2587,8 @@ void ReplicatedPG::calc_clone_subsets(SnapSet& snapset, const sobject_t& soid,
       break;
 
   // any overlap with next older clone?
-  interval_set<__u64> cloning;
-  interval_set<__u64> prev;
+  interval_set<uint64_t> cloning;
+  interval_set<uint64_t> prev;
   if (size)
     prev.insert(0, size);    
   for (int j=i-1; j>=0; j--) {
@@ -2607,7 +2607,7 @@ void ReplicatedPG::calc_clone_subsets(SnapSet& snapset, const sobject_t& soid,
   }
   
   // overlap with next newest?
-  interval_set<__u64> next;
+  interval_set<uint64_t> next;
   if (size)
     next.insert(0, size);    
   for (unsigned j=i+1; j<snapset.clones.size(); j++) {
@@ -2662,8 +2662,8 @@ bool ReplicatedPG::pull(const sobject_t& soid)
   if (fromosd < 0)
     return false;
 
-  map<sobject_t, interval_set<__u64> > clone_subsets;
-  interval_set<__u64> data_subset;
+  map<sobject_t, interval_set<uint64_t> > clone_subsets;
+  interval_set<uint64_t> data_subset;
 
   // is this a snapped object?  if so, consult the snapset.. we may not need the entire object!
   if (soid.snap && soid.snap < CEPH_NOSNAP) {
@@ -2738,8 +2738,8 @@ void ReplicatedPG::push_to_replica(const sobject_t& soid, int peer)
   int r = osd->store->stat(coll_t::build_pg_coll(info.pgid), soid, &st);
   assert(r == 0);
   
-  map<sobject_t, interval_set<__u64> > clone_subsets;
-  interval_set<__u64> data_subset;
+  map<sobject_t, interval_set<uint64_t> > clone_subsets;
+  interval_set<uint64_t> data_subset;
 
   bufferlist bv;
   r = osd->store->getattr(coll_t::build_pg_coll(info.pgid), soid, OI_ATTR, bv);
@@ -2755,8 +2755,8 @@ void ReplicatedPG::push_to_replica(const sobject_t& soid, int peer)
       dout(10) << "push_to_replica osd" << peer << " has correct old " << head
               << " v" << oi.prior_version 
               << ", pushing " << soid << " attrs as a clone op" << dendl;
-      interval_set<__u64> data_subset;
-      map<sobject_t, interval_set<__u64> > clone_subsets;
+      interval_set<uint64_t> data_subset;
+      map<sobject_t, interval_set<uint64_t> > clone_subsets;
       if (st.st_size)
        clone_subsets[head].insert(0, st.st_size);
       push(soid, peer, data_subset, clone_subsets);
@@ -2800,19 +2800,19 @@ void ReplicatedPG::push_to_replica(const sobject_t& soid, int peer)
  */
 void ReplicatedPG::push(const sobject_t& soid, int peer)
 {
-  interval_set<__u64> subset;
-  map<sobject_t, interval_set<__u64> > clone_subsets;
+  interval_set<uint64_t> subset;
+  map<sobject_t, interval_set<uint64_t> > clone_subsets;
   push(soid, peer, subset, clone_subsets);
 }
 
 void ReplicatedPG::push(const sobject_t& soid, int peer, 
-                       interval_set<__u64> &data_subset,
-                       map<sobject_t, interval_set<__u64> >& clone_subsets)
+                       interval_set<uint64_t> &data_subset,
+                       map<sobject_t, interval_set<uint64_t> >& clone_subsets)
 {
   // read data+attrs
   bufferlist bl;
   map<nstring,bufferptr> attrset;
-  __u64 size;
+  uint64_t size;
 
   if (data_subset.size() || clone_subsets.size()) {
     struct stat st;
@@ -2820,7 +2820,7 @@ void ReplicatedPG::push(const sobject_t& soid, int peer,
     assert(r == 0);
     size = st.st_size;
 
-    for (map<__u64,__u64>::iterator p = data_subset.m.begin();
+    for (map<uint64_t,uint64_t>::iterator p = data_subset.m.begin();
         p != data_subset.m.end();
         p++) {
       bufferlist bit;
@@ -2991,8 +2991,8 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op)
          << " data len " << op->get_data().length()
           << dendl;
 
-  interval_set<__u64> data_subset;
-  map<sobject_t, interval_set<__u64> > clone_subsets;
+  interval_set<uint64_t> data_subset;
+  map<sobject_t, interval_set<uint64_t> > clone_subsets;
 
   bufferlist data;
   data.claim(op->get_data());
@@ -3016,7 +3016,7 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op)
 
       clone_subsets.clear();   // forget what pusher said; recalculate cloning.
 
-      interval_set<__u64> data_needed;
+      interval_set<uint64_t> data_needed;
       calc_clone_subsets(ssc->snapset, soid, missing, data_needed, clone_subsets);
       put_snapset_context(ssc);
       
@@ -3029,22 +3029,22 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op)
 
       // did we get more data than we need?
       if (!data_subset.subset_of(data_needed)) {
-       interval_set<__u64> extra = data_subset;
+       interval_set<uint64_t> extra = data_subset;
        extra.subtract(data_needed);
        dout(10) << " we got some extra: " << extra << dendl;
 
        bufferlist result;
        int off = 0;
-       for (map<__u64,__u64>::iterator p = data_subset.m.begin();
+       for (map<uint64_t,uint64_t>::iterator p = data_subset.m.begin();
             p != data_subset.m.end();
             p++) {
-         interval_set<__u64> x;
+         interval_set<uint64_t> x;
          x.insert(p->first, p->second);
          x.intersection_of(data_needed);
          dout(20) << " data_subset object extent " << p->first << "~" << p->second << " need " << x << dendl;
          if (!x.empty()) {
-           __u64 first = x.m.begin()->first;
-           __u64 len = x.m.begin()->second;
+           uint64_t first = x.m.begin()->first;
+           uint64_t len = x.m.begin()->second;
            bufferlist sub;
            int boff = off + (first - p->first);
            dout(20) << "   keeping buffer extent " << boff << "~" << len << dendl;
@@ -3069,17 +3069,17 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op)
   ObjectStore::Transaction *t = new ObjectStore::Transaction;
   t->remove(coll_t::build_pg_coll(info.pgid), soid);  // in case old version exists
 
-  __u64 boff = 0;
-  for (map<sobject_t, interval_set<__u64> >::iterator p = clone_subsets.begin();
+  uint64_t boff = 0;
+  for (map<sobject_t, interval_set<uint64_t> >::iterator p = clone_subsets.begin();
        p != clone_subsets.end();
        p++)
-    for (map<__u64,__u64>::iterator q = p->second.m.begin();
+    for (map<uint64_t,uint64_t>::iterator q = p->second.m.begin();
         q != p->second.m.end(); 
         q++) {
       dout(15) << " clone_range " << p->first << " " << q->first << "~" << q->second << dendl;
       t->clone_range(coll_t::build_pg_coll(info.pgid), p->first, soid, q->first, q->second);
     }
-  for (map<__u64,__u64>::iterator p = data_subset.m.begin();
+  for (map<uint64_t,uint64_t>::iterator p = data_subset.m.begin();
        p != data_subset.m.end(); 
        p++) {
     bufferlist bit;
@@ -3635,10 +3635,10 @@ int ReplicatedPG::_scrub(ScrubMap& scrubmap, int& errors, int& fixed)
        curclone = snapset.clones.size()-1;
 
       // subtract off any clone overlap
-      for (map<snapid_t,interval_set<__u64> >::iterator q = snapset.clone_overlap.begin();
+      for (map<snapid_t,interval_set<uint64_t> >::iterator q = snapset.clone_overlap.begin();
           q != snapset.clone_overlap.end();
           q++) {
-       for (map<__u64,__u64>::iterator r = q->second.m.begin();
+       for (map<uint64_t,uint64_t>::iterator r = q->second.m.begin();
             r != q->second.m.end();
             r++) {
          stat.num_bytes -= r->second;
index f5ff2e3a482733b57a3eecf2a6d4bf8d18fca71c..1c2e3419a7587fa6d71f387038d4517665922ed4 100644 (file)
@@ -405,7 +405,7 @@ protected:
   void op_commit(RepGather *repop);
   void eval_repop(RepGather*);
   void issue_repop(RepGather *repop, int dest, utime_t now,
-                  bool old_exists, __u64 old_size, eversion_t old_version);
+                  bool old_exists, uint64_t old_size, eversion_t old_version);
   RepGather *new_repop(OpContext *ctx, ObjectContext *obc, bool noop, tid_t rep_tid);
   void repop_ack(RepGather *repop,
                  int result, int ack_type,
@@ -463,15 +463,15 @@ protected:
 
   void calc_head_subsets(SnapSet& snapset, const sobject_t& head,
                         Missing& missing,
-                        interval_set<__u64>& data_subset,
-                        map<sobject_t, interval_set<__u64> >& clone_subsets);
+                        interval_set<uint64_t>& data_subset,
+                        map<sobject_t, interval_set<uint64_t> >& clone_subsets);
   void calc_clone_subsets(SnapSet& snapset, const sobject_t& poid, Missing& missing,
-                         interval_set<__u64>& data_subset,
-                         map<sobject_t, interval_set<__u64> >& clone_subsets);
+                         interval_set<uint64_t>& data_subset,
+                         map<sobject_t, interval_set<uint64_t> >& clone_subsets);
   void push_to_replica(const sobject_t& oid, int dest);
   void push(const sobject_t& oid, int dest);
-  void push(const sobject_t& oid, int dest, interval_set<__u64>& data_subset, 
-           map<sobject_t, interval_set<__u64> >& clone_subsets);
+  void push(const sobject_t& oid, int dest, interval_set<uint64_t>& data_subset, 
+           map<sobject_t, interval_set<uint64_t> >& clone_subsets);
   bool pull(const sobject_t& oid);
 
 
@@ -482,7 +482,7 @@ protected:
                   object_info_t *poi);
   void make_writeable(OpContext *ctx);
   void log_op_stats(const sobject_t &soid, OpContext *ctx);
-  void add_interval_usage(interval_set<__u64>& s, pg_stat_t& st);  
+  void add_interval_usage(interval_set<uint64_t>& s, pg_stat_t& st);  
 
   int prepare_transaction(OpContext *ctx);
   void log_op(vector<Log::Entry>& log, eversion_t trim_to, ObjectStore::Transaction& t);
index 36136fc7ae5221459fcf8aad5728fbbf76541c29..f7e009a4008c6e23d11a3038e4e108f478d46422 100644 (file)
@@ -750,18 +750,18 @@ struct pg_stat_t {
   eversion_t last_scrub;
   utime_t last_scrub_stamp;
 
-  __u64 num_bytes;    // in bytes
-  __u64 num_kb;       // in KB
-  __u64 num_objects;
-  __u64 num_object_clones;
-  __u64 num_object_copies;  // num_objects * num_replicas
-  __u64 num_objects_missing_on_primary;
-  __u64 num_objects_degraded;
-  __u64 log_size;
-  __u64 ondisk_log_size;    // >= active_log_size
-
-  __u64 num_rd, num_rd_kb;
-  __u64 num_wr, num_wr_kb;
+  uint64_t num_bytes;    // in bytes
+  uint64_t num_kb;       // in KB
+  uint64_t num_objects;
+  uint64_t num_object_clones;
+  uint64_t num_object_copies;  // num_objects * num_replicas
+  uint64_t num_objects_missing_on_primary;
+  uint64_t num_objects_degraded;
+  uint64_t log_size;
+  uint64_t ondisk_log_size;    // >= active_log_size
+
+  uint64_t num_rd, num_rd_kb;
+  uint64_t num_wr, num_wr_kb;
   
   vector<int> up, acting;
 
@@ -875,17 +875,17 @@ WRITE_CLASS_ENCODER(pg_stat_t)
  * summation over an entire pool
  */
 struct pool_stat_t {
-  __u64 num_bytes;    // in bytes
-  __u64 num_kb;       // in KB
-  __u64 num_objects;
-  __u64 num_object_clones;
-  __u64 num_object_copies;  // num_objects * num_replicas
-  __u64 num_objects_missing_on_primary;
-  __u64 num_objects_degraded;
-  __u64 log_size;
-  __u64 ondisk_log_size;    // >= active_log_size
-  __u64 num_rd, num_rd_kb;
-  __u64 num_wr, num_wr_kb;
+  uint64_t num_bytes;    // in bytes
+  uint64_t num_kb;       // in KB
+  uint64_t num_objects;
+  uint64_t num_object_clones;
+  uint64_t num_object_copies;  // num_objects * num_replicas
+  uint64_t num_objects_missing_on_primary;
+  uint64_t num_objects_degraded;
+  uint64_t log_size;
+  uint64_t ondisk_log_size;    // >= active_log_size
+  uint64_t num_rd, num_rd_kb;
+  uint64_t num_wr, num_wr_kb;
 
   pool_stat_t() : num_bytes(0), num_kb(0), 
                  num_objects(0), num_object_clones(0), num_object_copies(0),
@@ -1098,7 +1098,7 @@ inline ostream& operator<<(ostream& out, OSDSuperblock& sb)
 
 // -------
 
-WRITE_CLASS_ENCODER(interval_set<__u64>)
+WRITE_CLASS_ENCODER(interval_set<uint64_t>)
 
 
 
@@ -1113,8 +1113,8 @@ struct SnapSet {
   bool head_exists;
   vector<snapid_t> snaps;    // ascending
   vector<snapid_t> clones;   // ascending
-  map<snapid_t, interval_set<__u64> > clone_overlap;  // overlap w/ next newest
-  map<snapid_t, __u64> clone_size;
+  map<snapid_t, interval_set<uint64_t> > clone_overlap;  // overlap w/ next newest
+  map<snapid_t, uint64_t> clone_size;
 
   SnapSet() : head_exists(false) {}
   SnapSet(bufferlist& bl) {
@@ -1162,13 +1162,13 @@ struct object_info_t {
   eversion_t version, prior_version;
   osd_reqid_t last_reqid;
 
-  __u64 size;
+  uint64_t size;
   utime_t mtime;
 
   osd_reqid_t wrlock_by;   // [head]
   vector<snapid_t> snaps;  // [clone]
 
-  __u64 truncate_seq, truncate_size;
+  uint64_t truncate_seq, truncate_size;
 
   void encode(bufferlist& bl) const {
     const __u8 v = 1;
@@ -1235,7 +1235,7 @@ inline ostream& operator<<(ostream& out, const object_info_t& oi) {
 struct ScrubMap {
   struct object {
     sobject_t poid;
-    __u64 size;
+    uint64_t size;
     map<nstring,bufferptr> attrs;
 
     void encode(bufferlist& bl) const {
@@ -1299,12 +1299,12 @@ inline ostream& operator<<(ostream& out, const OSDOp& op) {
       break;
     case CEPH_OSD_OP_MASKTRUNC:
     case CEPH_OSD_OP_TRIMTRUNC:
-      out << " " << op.op.extent.truncate_seq << "@" << (__s64)op.op.extent.truncate_size;
+      out << " " << op.op.extent.truncate_seq << "@" << (int64_t)op.op.extent.truncate_size;
       break;
     default:
       out << " " << op.op.extent.offset << "~" << op.op.extent.length;
       if (op.op.extent.truncate_seq)
-       out << " [" << op.op.extent.truncate_seq << "@" << (__s64)op.op.extent.truncate_size << "]";
+       out << " [" << op.op.extent.truncate_seq << "@" << (int64_t)op.op.extent.truncate_size << "]";
     }
   } else if (ceph_osd_op_type_attr(op.op.op)) {
     // xattr name
index adc54211c5c39ca6c862ff53368adf14decfd728..fe8901767ad56de288da312b582e322760b7a4eb 100644 (file)
@@ -36,7 +36,7 @@ public:
   Filer *filer;
   Probe *probe;
   object_t oid;
-  __u64 size;
+  uint64_t size;
   utime_t mtime;
   C_Probe(Filer *f, Probe *p, object_t o) : filer(f), probe(p), oid(o), size(0) {}
   void finish(int r) {
@@ -47,8 +47,8 @@ public:
 int Filer::probe(inodeno_t ino,
                 ceph_file_layout *layout,
                 snapid_t snapid,
-                __u64 start_from,
-                __u64 *end,           // LB, when !fwd
+                uint64_t start_from,
+                uint64_t *end,           // LB, when !fwd
                 utime_t *pmtime,
                 bool fwd,
                 int flags,
@@ -64,7 +64,7 @@ int Filer::probe(inodeno_t ino,
   Probe *probe = new Probe(ino, *layout, snapid, start_from, end, pmtime, flags, fwd, onfinish);
   
   // period (bytes before we jump unto a new set of object(s))
-  __u64 period = layout->fl_stripe_count * layout->fl_object_size;
+  uint64_t period = layout->fl_stripe_count * layout->fl_object_size;
   
   // start with 1+ periods.
   probe->probing_len = period;
@@ -104,7 +104,7 @@ void Filer::_probe(Probe *probe)
   }
 }
 
-void Filer::_probed(Probe *probe, const object_t& oid, __u64 size, utime_t mtime)
+void Filer::_probed(Probe *probe, const object_t& oid, uint64_t size, utime_t mtime)
 {
   dout(10) << "_probed " << probe->ino << " object " << oid
           << " has size " << size << " mtime " << mtime << dendl;
@@ -120,7 +120,7 @@ void Filer::_probed(Probe *probe, const object_t& oid, __u64 size, utime_t mtime
     return;  // waiting for more!
 
   // analyze!
-  __u64 end = 0;
+  uint64_t end = 0;
 
   if (!probe->fwd) {
     // reverse
@@ -135,7 +135,7 @@ void Filer::_probed(Probe *probe, const object_t& oid, __u64 size, utime_t mtime
   for (vector<ObjectExtent>::iterator p = probe->probing.begin();
        p != probe->probing.end();
        p++) {
-    __u64 shouldbe = p->length + p->offset;
+    uint64_t shouldbe = p->length + p->offset;
     dout(10) << "_probed  " << probe->ino << " object " << hex << p->oid << dec
             << " should be " << shouldbe
             << ", actual is " << probe->known_size[p->oid]
@@ -156,11 +156,11 @@ void Filer::_probed(Probe *probe, const object_t& oid, __u64 size, utime_t mtime
       
       // aha, we found the end!
       // calc offset into buffer_extent to get distance from probe->from.
-      __u64 oleft = probe->known_size[p->oid] - p->offset;
+      uint64_t oleft = probe->known_size[p->oid] - p->offset;
       for (map<__u32,__u32>::iterator i = p->buffer_extents.begin();
           i != p->buffer_extents.end();
           i++) {
-       if (oleft <= (__u64)i->second) {
+       if (oleft <= (uint64_t)i->second) {
          end = probe->probing_off + i->first + oleft;
          dout(10) << "_probed  end is in buffer_extent " << i->first << "~" << i->second << " off " << oleft 
                   << ", from was " << probe->probing_off << ", end is " << end 
@@ -183,7 +183,7 @@ void Filer::_probed(Probe *probe, const object_t& oid, __u64 size, utime_t mtime
     // keep probing!
     dout(10) << "_probed probing further" << dendl;
 
-    __u64 period = probe->layout.fl_stripe_count * probe->layout.fl_object_size;
+    uint64_t period = probe->layout.fl_stripe_count * probe->layout.fl_object_size;
     if (probe->fwd) {
       probe->probing_off += probe->probing_len;
       assert(probe->probing_off % period == 0);
@@ -216,7 +216,7 @@ struct PurgeRange {
   inodeno_t ino;
   ceph_file_layout layout;
   SnapContext snapc;
-  __u64 first, num;
+  uint64_t first, num;
   utime_t mtime;
   int flags;
   Context *oncommit;
@@ -226,7 +226,7 @@ struct PurgeRange {
 int Filer::purge_range(inodeno_t ino,
                       ceph_file_layout *layout,
                       const SnapContext& snapc,
-                      __u64 first_obj, __u64 num_obj,
+                      uint64_t first_obj, uint64_t num_obj,
                       utime_t mtime,
                       int flags,
                       Context *oncommit) 
@@ -296,7 +296,7 @@ void Filer::_do_purge_range(PurgeRange *pr, int fin)
 // -----------------------
 
 void Filer::file_to_extents(inodeno_t ino, ceph_file_layout *layout,
-                            __u64 offset, __u64 len,
+                            uint64_t offset, uint64_t len,
                             vector<ObjectExtent>& extents)
 {
   dout(10) << "file_to_extents " << offset << "~" << len 
@@ -314,18 +314,18 @@ void Filer::file_to_extents(inodeno_t ino, ceph_file_layout *layout,
   __u32 su = layout->fl_stripe_unit;
   __u32 stripe_count = layout->fl_stripe_count;
   assert(object_size >= su);
-  __u64 stripes_per_object = object_size / su;
+  uint64_t stripes_per_object = object_size / su;
   dout(20) << " stripes_per_object " << stripes_per_object << dendl;
 
-  __u64 cur = offset;
-  __u64 left = len;
+  uint64_t cur = offset;
+  uint64_t left = len;
   while (left > 0) {
     // layout into objects
-    __u64 blockno = cur / su;          // which block
-    __u64 stripeno = blockno / stripe_count;    // which horizontal stripe        (Y)
-    __u64 stripepos = blockno % stripe_count;   // which object in the object set (X)
-    __u64 objectsetno = stripeno / stripes_per_object;       // which object set
-    __u64 objectno = objectsetno * stripe_count + stripepos;  // object id
+    uint64_t blockno = cur / su;          // which block
+    uint64_t stripeno = blockno / stripe_count;    // which horizontal stripe        (Y)
+    uint64_t stripepos = blockno % stripe_count;   // which object in the object set (X)
+    uint64_t objectsetno = stripeno / stripes_per_object;       // which object set
+    uint64_t objectno = objectsetno * stripe_count + stripepos;  // object id
     
     // find oid, extent
     ObjectExtent *ex = 0;
@@ -339,18 +339,18 @@ void Filer::file_to_extents(inodeno_t ino, ceph_file_layout *layout,
     }
     
     // map range into object
-    __u64 block_start = (stripeno % stripes_per_object)*su;
-    __u64 block_off = cur % su;
-    __u64 max = su - block_off;
+    uint64_t block_start = (stripeno % stripes_per_object)*su;
+    uint64_t block_off = cur % su;
+    uint64_t max = su - block_off;
     
-    __u64 x_offset = block_start + block_off;
-    __u64 x_len;
+    uint64_t x_offset = block_start + block_off;
+    uint64_t x_len;
     if (left > max)
       x_len = max;
     else
       x_len = left;
     
-    if (ex->offset + (__u64)ex->length == x_offset) {
+    if (ex->offset + (uint64_t)ex->length == x_offset) {
       // add to extent
       ex->length += x_len;
     } else {
index 0208a890562113f20865ff6537b7645d59a16c29..73e43028a48aa757ad33dc42b99cbf0d2ba8222b 100644 (file)
@@ -48,7 +48,7 @@ class Filer {
     ceph_file_layout layout;
     snapid_t snapid;
 
-    __u64 *psize;
+    uint64_t *psize;
     utime_t *pmtime;
 
     int flags;
@@ -58,9 +58,9 @@ class Filer {
     Context *onfinish;
     
     vector<ObjectExtent> probing;
-    __u64 probing_off, probing_len;
+    uint64_t probing_off, probing_len;
     
-    map<object_t, __u64> known_size;
+    map<object_t, uint64_t> known_size;
     utime_t max_mtime;
 
     map<object_t, tid_t> ops;
@@ -69,7 +69,7 @@ class Filer {
     bool found_size;
 
     Probe(inodeno_t i, ceph_file_layout &l, snapid_t sn,
-         __u64 f, __u64 *e, utime_t *m, int fl, bool fw, Context *c) : 
+         uint64_t f, uint64_t *e, utime_t *m, int fl, bool fw, Context *c) : 
       ino(i), layout(l), snapid(sn),
       psize(e), pmtime(m), flags(fl), fwd(fw), onfinish(c),
       probing_off(f), probing_len(0),
@@ -79,7 +79,7 @@ class Filer {
   class C_Probe;
 
   void _probe(Probe *p);
-  void _probed(Probe *p, const object_t& oid, __u64 size, utime_t mtime);
+  void _probed(Probe *p, const object_t& oid, uint64_t size, utime_t mtime);
 
  public:
   Filer(Objecter *o) : objecter(o) {}
@@ -97,7 +97,7 @@ class Filer {
    * ranges in objects on (primary) osds)
    */
   void file_to_extents(inodeno_t ino, ceph_file_layout *layout,
-                      __u64 offset, __u64 len,
+                      uint64_t offset, uint64_t len,
                       vector<ObjectExtent>& extents);
 
 
@@ -108,8 +108,8 @@ class Filer {
   int read(inodeno_t ino,
           ceph_file_layout *layout,
           snapid_t snap,
-           __u64 offset, 
-           __u64 len, 
+           uint64_t offset, 
+           uint64_t len, 
            bufferlist *bl,   // ptr to data
           int flags,
            Context *onfinish) {
@@ -123,11 +123,11 @@ class Filer {
   int read_trunc(inodeno_t ino,
           ceph_file_layout *layout,
           snapid_t snap,
-           __u64 offset, 
-           __u64 len, 
+           uint64_t offset, 
+           uint64_t len, 
            bufferlist *bl,   // ptr to data
           int flags,
-          __u64 truncate_size,
+          uint64_t truncate_size,
           __u32 truncate_seq,
            Context *onfinish) {
     assert(snap);  // (until there is a non-NOSNAP write)
@@ -141,8 +141,8 @@ class Filer {
   int write(inodeno_t ino,
            ceph_file_layout *layout,
            const SnapContext& snapc,
-           __u64 offset, 
-            __u64 len, 
+           uint64_t offset, 
+            uint64_t len, 
             bufferlist& bl,
            utime_t mtime,
             int flags, 
@@ -157,12 +157,12 @@ class Filer {
   int write_trunc(inodeno_t ino,
            ceph_file_layout *layout,
            const SnapContext& snapc,
-           __u64 offset, 
-            __u64 len, 
+           uint64_t offset, 
+            uint64_t len, 
             bufferlist& bl,
            utime_t mtime,
             int flags, 
-          __u64 truncate_size,
+          uint64_t truncate_size,
           __u32 truncate_seq,
             Context *onack,
             Context *oncommit) {
@@ -176,8 +176,8 @@ class Filer {
   int truncate(inodeno_t ino,
               ceph_file_layout *layout,
               const SnapContext& snapc,
-              __u64 offset,
-              __u64 len,
+              uint64_t offset,
+              uint64_t len,
               __u32 truncate_seq,
               utime_t mtime,
               int flags,
@@ -213,8 +213,8 @@ class Filer {
   int zero(inodeno_t ino,
           ceph_file_layout *layout,
           const SnapContext& snapc,
-          __u64 offset,
-           __u64 len,
+          uint64_t offset,
+           uint64_t len,
           utime_t mtime,
           int flags,
            Context *onack,
@@ -244,7 +244,7 @@ class Filer {
   int purge_range(inodeno_t ino,
                  ceph_file_layout *layout,
                  const SnapContext& snapc,
-                 __u64 first_obj, __u64 num_obj,
+                 uint64_t first_obj, uint64_t num_obj,
                  utime_t mtime,
                  int flags,
                  Context *oncommit);
@@ -258,8 +258,8 @@ class Filer {
   int probe(inodeno_t ino,
            ceph_file_layout *layout,
            snapid_t snapid,
-           __u64 start_from,
-           __u64 *end,
+           uint64_t start_from,
+           uint64_t *end,
            utime_t *mtime,
            bool fwd,
            int flags,
index 85ef1a783a2c370c4ea9725bf04cac9fad107827..641fe6da125b709bffc417db3bd483b3db3a3f5b 100644 (file)
@@ -77,7 +77,7 @@ public:
 class Journaler::C_ProbeEnd : public Context {
   Journaler *ls;
 public:
-  __s64 end;
+  int64_t end;
   C_ProbeEnd(Journaler *l) : ls(l), end(-1) {}
   void finish(int r) {
     ls->_finish_probe_end(r, end);
@@ -146,10 +146,10 @@ void Journaler::_finish_read_head(int r, bufferlist& bl)
   state = STATE_PROBING;
   C_ProbeEnd *fin = new C_ProbeEnd(this);
   filer.probe(ino, &layout, CEPH_NOSNAP,
-             h.write_pos, (__u64 *)&fin->end, 0, true, 0, fin);
+             h.write_pos, (uint64_t *)&fin->end, 0, true, 0, fin);
 }
 
-void Journaler::_finish_probe_end(int r, __s64 end)
+void Journaler::_finish_probe_end(int r, int64_t end)
 {
   assert(state == STATE_PROBING);
   
@@ -228,15 +228,15 @@ void Journaler::_finish_write_head(Header &wrote, Context *oncommit)
 
 class Journaler::C_Flush : public Context {
   Journaler *ls;
-  __s64 start;
+  int64_t start;
   utime_t stamp;
   bool safe;
 public:
-  C_Flush(Journaler *l, __s64 s, utime_t st, bool sa) : ls(l), start(s), stamp(st), safe(sa) {}
+  C_Flush(Journaler *l, int64_t s, utime_t st, bool sa) : ls(l), start(s), stamp(st), safe(sa) {}
   void finish(int r) { ls->_finish_flush(r, start, stamp, safe); }
 };
 
-void Journaler::_finish_flush(int r, __s64 start, utime_t stamp, bool safe)
+void Journaler::_finish_flush(int r, int64_t start, utime_t stamp, bool safe)
 {
   assert(r>=0);
 
@@ -309,17 +309,17 @@ void Journaler::_finish_flush(int r, __s64 start, utime_t stamp, bool safe)
 }
 
 
-__s64 Journaler::append_entry(bufferlist& bl)
+int64_t Journaler::append_entry(bufferlist& bl)
 {
   uint32_t s = bl.length();
 
   if (!g_conf.journaler_allow_split_entries) {
     // will we span a stripe boundary?
     int p = layout.fl_stripe_unit;
-    if (write_pos / p != (write_pos + (__s64)(bl.length() + sizeof(s))) / p) {
+    if (write_pos / p != (write_pos + (int64_t)(bl.length() + sizeof(s))) / p) {
       // yes.
       // move write_pos forward.
-      __s64 owp = write_pos;
+      int64_t owp = write_pos;
       write_pos += p;
       write_pos -= (write_pos % p);
       
@@ -568,7 +568,7 @@ void Journaler::_finish_read(int r)
  * then discover we need even more for an especially large entry.
  * i don't think that circumstance will arise particularly often.
  */
-void Journaler::_issue_read(__s64 len)
+void Journaler::_issue_read(int64_t len)
 {
   // make sure we're fully flushed
   _do_flush();
@@ -612,7 +612,7 @@ void Journaler::_issue_read(__s64 len)
 void Journaler::_prefetch()
 {
   // prefetch?
-  __s64 left = requested_pos - read_pos;
+  int64_t left = requested_pos - read_pos;
   if (left <= prefetch_from &&      // should read more,
       !_is_reading() &&             // and not reading anything right now
       write_pos > requested_pos) {  // there's something more to read...
@@ -696,7 +696,7 @@ bool Journaler::is_readable()
   // start reading some more?
   if (!_is_reading()) {
     if (s)
-      fetch_len = MAX(fetch_len, (__s64)(sizeof(s)+s-read_buf.length())); 
+      fetch_len = MAX(fetch_len, (int64_t)(sizeof(s)+s-read_buf.length())); 
     _issue_read(fetch_len);
   }
 
@@ -710,7 +710,7 @@ bool Journaler::truncate_tail_junk(Context *c)
     return true;
   }
 
-  __s64 len = junk_tail_pos - write_pos;
+  int64_t len = junk_tail_pos - write_pos;
   dout(10) << "truncate_tail_junk " << write_pos << "~" << len << dendl;
   SnapContext snapc;
   filer.zero(ino, &layout, snapc, write_pos, len, g_clock.now(), 0, NULL, c);
@@ -772,9 +772,9 @@ void Journaler::wait_for_readable(Context *onreadable)
 
 class Journaler::C_Trim : public Context {
   Journaler *ls;
-  __s64 to;
+  int64_t to;
 public:
-  C_Trim(Journaler *l, __s64 t) : ls(l), to(t) {}
+  C_Trim(Journaler *l, int64_t t) : ls(l), to(t) {}
   void finish(int r) {
     ls->_trim_finish(r, to);
   }
@@ -782,9 +782,9 @@ public:
 
 void Journaler::trim()
 {
-  __u64 period = layout.fl_stripe_count * layout.fl_object_size;
+  uint64_t period = layout.fl_stripe_count * layout.fl_object_size;
 
-  __s64 trim_to = last_committed.expire_pos;
+  int64_t trim_to = last_committed.expire_pos;
   trim_to -= trim_to % period;
   dout(10) << "trim last_commited head was " << last_committed
           << ", can trim to " << trim_to
@@ -810,15 +810,15 @@ void Journaler::trim()
           << dendl;
 
   // delete range of objects
-  __u64 first = trimming_pos / period;
-  __u64 num = (trim_to - trimming_pos) / period;
+  uint64_t first = trimming_pos / period;
+  uint64_t num = (trim_to - trimming_pos) / period;
   SnapContext snapc;
   filer.purge_range(ino, &layout, snapc, first, num, g_clock.now(), 0, 
                    new C_Trim(this, trim_to));
   trimming_pos = trim_to;  
 }
 
-void Journaler::_trim_finish(int r, __s64 to)
+void Journaler::_trim_finish(int r, int64_t to)
 {
   dout(10) << "_trim_finish trimmed_pos was " << trimmed_pos
           << ", trimmed/trimming/expire now "
index 0152857d647ccac841c13e31a682e3a6aaf852b5..dc907cac0907678d6c5be34909a1cab86186aa5e 100644 (file)
@@ -64,10 +64,10 @@ class Journaler {
 public:
   // this goes at the head of the log "file".
   struct Header {
-    __s64 trimmed_pos;
-    __s64 expire_pos;
-    __s64 read_pos;
-    __s64 write_pos;
+    int64_t trimmed_pos;
+    int64_t expire_pos;
+    int64_t read_pos;
+    int64_t write_pos;
     nstring magic;
     ceph_file_layout layout;
 
@@ -142,7 +142,7 @@ public:
 
   list<Context*> waitfor_recover;
   void _finish_read_head(int r, bufferlist& bl);
-  void _finish_probe_end(int r, __s64 end);
+  void _finish_probe_end(int r, int64_t end);
   class C_ReadHead;
   friend class C_ReadHead;
   class C_ProbeEnd;
@@ -151,33 +151,33 @@ public:
 
 
   // writer
-  __s64 write_pos;       // logical write position, where next entry will go
-  __s64 flush_pos;       // where we will flush. if write_pos>flush_pos, we're buffering writes.
-  __s64 ack_pos;         // what has been acked.
-  __s64 safe_pos;        // what has been committed safely to disk.
+  int64_t write_pos;       // logical write position, where next entry will go
+  int64_t flush_pos;       // where we will flush. if write_pos>flush_pos, we're buffering writes.
+  int64_t ack_pos;         // what has been acked.
+  int64_t safe_pos;        // what has been committed safely to disk.
   bufferlist write_buf;  // write buffer.  flush_pos + write_buf.length() == write_pos.
 
-  std::set<__s64> pending_ack, pending_safe;
-  std::map<__s64, std::list<Context*> > waitfor_ack;  // when flushed through given offset
-  std::map<__s64, std::list<Context*> > waitfor_safe; // when safe through given offset
-  std::set<__s64> ack_barrier;
+  std::set<int64_t> pending_ack, pending_safe;
+  std::map<int64_t, std::list<Context*> > waitfor_ack;  // when flushed through given offset
+  std::map<int64_t, std::list<Context*> > waitfor_safe; // when safe through given offset
+  std::set<int64_t> ack_barrier;
 
   void _do_flush(unsigned amount=0);
-  void _finish_flush(int r, __s64 start, utime_t stamp, bool safe);
+  void _finish_flush(int r, int64_t start, utime_t stamp, bool safe);
   class C_Flush;
   friend class C_Flush;
 
   // reader
-  __s64 read_pos;      // logical read position, where next entry starts.
-  __s64 requested_pos; // what we've requested from OSD.
-  __s64 received_pos;  // what we've received from OSD.
+  int64_t read_pos;      // logical read position, where next entry starts.
+  int64_t requested_pos; // what we've requested from OSD.
+  int64_t received_pos;  // what we've received from OSD.
   bufferlist read_buf; // read buffer.  read_pos + read_buf.length() == prefetch_pos.
   bufferlist reading_buf; // what i'm reading into
 
-  __s64 fetch_len;     // how much to read at a time
-  __s64 prefetch_from; // how far from end do we read next chunk
+  int64_t fetch_len;     // how much to read at a time
+  int64_t prefetch_from; // how far from end do we read next chunk
 
-  __s64 junk_tail_pos; // for truncate
+  int64_t junk_tail_pos; // for truncate
 
   // for read_entry() in-progress read
   bufferlist *read_bl;
@@ -189,7 +189,7 @@ public:
     return requested_pos > received_pos;
   }
   void _finish_read(int r);     // we just read some (read completion callback)
-  void _issue_read(__s64 len);  // read some more
+  void _issue_read(int64_t len);  // read some more
   void _prefetch();             // maybe read ahead
   class C_Read;
   friend class C_Read;
@@ -197,12 +197,12 @@ public:
   friend class C_RetryRead;
 
   // trimmer
-  __s64 expire_pos;    // what we're allowed to trim to
-  __s64 trimming_pos;      // what we've requested to trim through
-  __s64 trimmed_pos;   // what has been trimmed
-  map<__s64, list<Context*> > waitfor_trim;
+  int64_t expire_pos;    // what we're allowed to trim to
+  int64_t trimming_pos;      // what we've requested to trim through
+  int64_t trimmed_pos;   // what has been trimmed
+  map<int64_t, list<Context*> > waitfor_trim;
 
-  void _trim_finish(int r, __s64 to);
+  void _trim_finish(int r, int64_t to);
   class C_Trim;
   friend class C_Trim;
 
@@ -240,23 +240,23 @@ public:
   bool is_active() { return state == STATE_ACTIVE; }
   int get_error() { return error; }
 
-  __s64 get_write_pos() const { return write_pos; }
-  __s64 get_write_ack_pos() const { return ack_pos; }
-  __s64 get_write_safe_pos() const { return safe_pos; }
-  __s64 get_read_pos() const { return read_pos; }
-  __s64 get_expire_pos() const { return expire_pos; }
-  __s64 get_trimmed_pos() const { return trimmed_pos; }
+  int64_t get_write_pos() const { return write_pos; }
+  int64_t get_write_ack_pos() const { return ack_pos; }
+  int64_t get_write_safe_pos() const { return safe_pos; }
+  int64_t get_read_pos() const { return read_pos; }
+  int64_t get_expire_pos() const { return expire_pos; }
+  int64_t get_trimmed_pos() const { return trimmed_pos; }
 
-  __s64 get_layout_period() const { return layout.fl_stripe_count * layout.fl_object_size; }
+  int64_t get_layout_period() const { return layout.fl_stripe_count * layout.fl_object_size; }
   ceph_file_layout& get_layout() { return layout; }
 
   // write
-  __s64 append_entry(bufferlist& bl);
+  int64_t append_entry(bufferlist& bl);
   void wait_for_flush(Context *onsync = 0, Context *onsafe = 0, bool add_ack_barrier=false);
   void flush(Context *onsync = 0, Context *onsafe = 0, bool add_ack_barrier=false);
 
   // read
-  void set_read_pos(__s64 p) { 
+  void set_read_pos(int64_t p) { 
     assert(requested_pos == received_pos);  // we can't cope w/ in-progress read right now.
     assert(read_bl == 0); // ...
     read_pos = requested_pos = received_pos = p;
@@ -270,10 +270,10 @@ public:
   bool truncate_tail_junk(Context *fin);
 
   // trim
-  void set_expire_pos(__s64 ep) { expire_pos = ep; }
+  void set_expire_pos(int64_t ep) { expire_pos = ep; }
   void trim();
   //bool is_trimmable() { return trimming_pos < expire_pos; }
-  //void trim(__s64 trim_to=0, Context *c=0);
+  //void trim(int64_t trim_to=0, Context *c=0);
 };
 WRITE_CLASS_ENCODER(Journaler::Header)
 
index 52f1067597370e8d8a1de2425e498c78f313f1bd..f789688b65e8b782d1b74bad9f34182af669bd07 100644 (file)
@@ -444,7 +444,7 @@ void ObjectCacher::bh_read(BufferHead *bh)
                 onfinish);
 }
 
-void ObjectCacher::bh_read_finish(sobject_t oid, loff_t start, __u64 length, bufferlist &bl)
+void ObjectCacher::bh_read_finish(sobject_t oid, loff_t start, uint64_t length, bufferlist &bl)
 {
   //lock.Lock();
   dout(7) << "bh_read_finish " 
@@ -610,7 +610,7 @@ void ObjectCacher::lock_ack(list<sobject_t>& oids, tid_t tid)
   }
 }
 
-void ObjectCacher::bh_write_ack(sobject_t oid, loff_t start, __u64 length, tid_t tid)
+void ObjectCacher::bh_write_ack(sobject_t oid, loff_t start, uint64_t length, tid_t tid)
 {
   //lock.Lock();
   
@@ -677,7 +677,7 @@ void ObjectCacher::bh_write_ack(sobject_t oid, loff_t start, __u64 length, tid_t
   //lock.Unlock();
 }
 
-void ObjectCacher::bh_write_commit(sobject_t oid, loff_t start, __u64 length, tid_t tid)
+void ObjectCacher::bh_write_commit(sobject_t oid, loff_t start, uint64_t length, tid_t tid)
 {
   //lock.Lock();
   
@@ -808,7 +808,7 @@ int ObjectCacher::readx(OSDRead *rd, ObjectSet *oset, Context *onfinish)
 {
   bool success = true;
   list<BufferHead*> hit_ls;
-  map<__u64, bufferlist> stripe_map;  // final buffer offset -> substring
+  map<uint64_t, bufferlist> stripe_map;  // final buffer offset -> substring
 
   for (vector<ObjectExtent>::iterator ex_it = rd->extents.begin();
        ex_it != rd->extents.end();
@@ -867,9 +867,9 @@ int ObjectCacher::readx(OSDRead *rd, ObjectSet *oset, Context *onfinish)
       loff_t opos = ex_it->offset;
       map<loff_t, BufferHead*>::iterator bh_it = hits.begin();
       assert(bh_it->second->start() <= opos);
-      __u64 bhoff = opos - bh_it->second->start();
+      uint64_t bhoff = opos - bh_it->second->start();
       map<__u32,__u32>::iterator f_it = ex_it->buffer_extents.begin();
-      __u64 foff = 0;
+      uint64_t foff = 0;
       while (1) {
         BufferHead *bh = bh_it->second;
         assert(opos == (loff_t)(bh->start() + bhoff));
@@ -879,7 +879,7 @@ int ObjectCacher::readx(OSDRead *rd, ObjectSet *oset, Context *onfinish)
                  << " frag " << f_it->first << "~" << f_it->second << " +" << foff
                  << dendl;
 
-        __u64 len = MIN(f_it->second - foff,
+        uint64_t len = MIN(f_it->second - foff,
                          bh->length() - bhoff);
        bufferlist bit;  // put substr here first, since substr_of clobbers, and
                         // we may get multiple bh's at this stripe_map position
@@ -920,10 +920,10 @@ int ObjectCacher::readx(OSDRead *rd, ObjectSet *oset, Context *onfinish)
   dout(10) << "readx has all buffers" << dendl;
   
   // ok, assemble into result buffer.
-  __u64 pos = 0;
+  uint64_t pos = 0;
   if (rd->bl) {
     rd->bl->clear();
-    for (map<__u64,bufferlist>::iterator i = stripe_map.begin();
+    for (map<uint64_t,bufferlist>::iterator i = stripe_map.begin();
         i != stripe_map.end();
         i++) {
       assert(pos == i->first);
@@ -971,7 +971,7 @@ int ObjectCacher::writex(OSDWrite *wr, ObjectSet *oset)
          f_it != ex_it->buffer_extents.end();
          f_it++) {
       dout(10) << "writex writing " << f_it->first << "~" << f_it->second << " into " << *bh << " at " << opos << dendl;
-      __u64 bhoff = bh->start() - opos;
+      uint64_t bhoff = bh->start() - opos;
       assert(f_it->second <= bh->length() - bhoff);
 
       // get the frag we're mapping in
@@ -1005,7 +1005,7 @@ int ObjectCacher::writex(OSDWrite *wr, ObjectSet *oset)
  
 
 // blocking wait for write.
-bool ObjectCacher::wait_for_write(__u64 len, Mutex& lock)
+bool ObjectCacher::wait_for_write(uint64_t len, Mutex& lock)
 {
   int blocked = 0;
 
@@ -1613,10 +1613,10 @@ loff_t ObjectCacher::release_set(ObjectSet *oset)
 }
 
 
-__u64 ObjectCacher::release_all()
+uint64_t ObjectCacher::release_all()
 {
   dout(10) << "release_all" << dendl;
-  __u64 unclean = 0;
+  uint64_t unclean = 0;
   
   hash_map<sobject_t, Object*>::iterator p = objects.begin();
   while (p != objects.end()) {
index c4e5c592bc1bfb128558053f4ddd2e5c6eb0c4d1..44d8ccd80c1e56e383ff1906d58cc697e1b4fecd 100644 (file)
@@ -249,7 +249,7 @@ class ObjectCacher {
     void *parent;
 
     inodeno_t ino;
-    __u64 truncate_seq, truncate_size;
+    uint64_t truncate_seq, truncate_size;
 
     xlist<Object*> objects;
     xlist<Object*> uncommitted;
@@ -436,19 +436,19 @@ class ObjectCacher {
   void wrunlock(Object *o);
 
  public:
-  void bh_read_finish(sobject_t oid, loff_t offset, __u64 length, bufferlist &bl);
-  void bh_write_ack(sobject_t oid, loff_t offset, __u64 length, tid_t t);
-  void bh_write_commit(sobject_t oid, loff_t offset, __u64 length, tid_t t);
+  void bh_read_finish(sobject_t oid, loff_t offset, uint64_t length, bufferlist &bl);
+  void bh_write_ack(sobject_t oid, loff_t offset, uint64_t length, tid_t t);
+  void bh_write_commit(sobject_t oid, loff_t offset, uint64_t length, tid_t t);
   void lock_ack(list<sobject_t>& oids, tid_t tid);
 
   class C_ReadFinish : public Context {
     ObjectCacher *oc;
     sobject_t oid;
     loff_t start;
-    __u64 length;
+    uint64_t length;
   public:
     bufferlist bl;
-    C_ReadFinish(ObjectCacher *c, sobject_t o, loff_t s, __u64 l) : oc(c), oid(o), start(s), length(l) {}
+    C_ReadFinish(ObjectCacher *c, sobject_t o, loff_t s, uint64_t l) : oc(c), oid(o), start(s), length(l) {}
     void finish(int r) {
       oc->bh_read_finish(oid, start, length, bl);
     }
@@ -458,10 +458,10 @@ class ObjectCacher {
     ObjectCacher *oc;
     sobject_t oid;
     loff_t start;
-    __u64 length;
+    uint64_t length;
   public:
     tid_t tid;
-    C_WriteAck(ObjectCacher *c, sobject_t o, loff_t s, __u64 l) : oc(c), oid(o), start(s), length(l) {}
+    C_WriteAck(ObjectCacher *c, sobject_t o, loff_t s, uint64_t l) : oc(c), oid(o), start(s), length(l) {}
     void finish(int r) {
       oc->bh_write_ack(oid, start, length, tid);
     }
@@ -470,10 +470,10 @@ class ObjectCacher {
     ObjectCacher *oc;
     sobject_t oid;
     loff_t start;
-    __u64 length;
+    uint64_t length;
   public:
     tid_t tid;
-    C_WriteCommit(ObjectCacher *c, sobject_t o, loff_t s, __u64 l) : oc(c), oid(o), start(s), length(l) {}
+    C_WriteCommit(ObjectCacher *c, sobject_t o, loff_t s, uint64_t l) : oc(c), oid(o), start(s), length(l) {}
     void finish(int r) {
       oc->bh_write_commit(oid, start, length, tid);
     }
@@ -546,7 +546,7 @@ class ObjectCacher {
   bool is_cached(ObjectSet *oset, vector<ObjectExtent>& extents, snapid_t snapid);
 
   // write blocking
-  bool wait_for_write(__u64 len, Mutex& lock);
+  bool wait_for_write(uint64_t len, Mutex& lock);
   
   // blocking.  atomic+sync.
   int atomic_sync_readx(OSDRead *rd, ObjectSet *oset, Mutex& lock);
@@ -564,7 +564,7 @@ class ObjectCacher {
   void purge_set(ObjectSet *oset);
 
   loff_t release_set(ObjectSet *oset);  // returns # of bytes not released (ie non-clean)
-  __u64 release_all();
+  uint64_t release_all();
 
   void truncate_set(ObjectSet *oset, vector<ObjectExtent>& ex);
 
@@ -576,14 +576,14 @@ class ObjectCacher {
 
   /*** async+caching (non-blocking) file interface ***/
   int file_is_cached(ObjectSet *oset, ceph_file_layout *layout, snapid_t snapid,
-                    loff_t offset, __u64 len) {
+                    loff_t offset, uint64_t len) {
     vector<ObjectExtent> extents;
     filer.file_to_extents(oset->ino, layout, offset, len, extents);
     return is_cached(oset, extents, snapid);
   }
 
   int file_read(ObjectSet *oset, ceph_file_layout *layout, snapid_t snapid,
-                loff_t offset, __u64 len, 
+                loff_t offset, uint64_t len, 
                 bufferlist *bl,
                int flags,
                 Context *onfinish) {
@@ -593,7 +593,7 @@ class ObjectCacher {
   }
 
   int file_write(ObjectSet *oset, ceph_file_layout *layout, const SnapContext& snapc,
-                 loff_t offset, __u64 len, 
+                 loff_t offset, uint64_t len, 
                  bufferlist& bl, utime_t mtime, int flags) {
     OSDWrite *wr = prepare_write(snapc, bl, mtime, flags);
     filer.file_to_extents(oset->ino, layout, offset, len, wr->extents);
@@ -606,7 +606,7 @@ class ObjectCacher {
 
   int file_atomic_sync_read(ObjectSet *oset, ceph_file_layout *layout, 
                            snapid_t snapid,
-                            loff_t offset, __u64 len, 
+                            loff_t offset, uint64_t len, 
                             bufferlist *bl, int flags,
                             Mutex &lock) {
     OSDRead *rd = prepare_read(snapid, bl, flags);
@@ -616,7 +616,7 @@ class ObjectCacher {
 
   int file_atomic_sync_write(ObjectSet *oset, ceph_file_layout *layout, 
                             const SnapContext& snapc,
-                             loff_t offset, __u64 len, 
+                             loff_t offset, uint64_t len, 
                              bufferlist& bl, utime_t mtime, int flags,
                              Mutex &lock) {
     OSDWrite *wr = prepare_write(snapc, bl, mtime, flags);
index 8b51e85daebd98ed5619ee4a2a3ce2471d46c09d..e599ffad0f0ee7ca59f6055a33513d1638b4b978 100644 (file)
@@ -613,7 +613,7 @@ void Objecter::_list_reply(ListContext *list_context, bufferlist *bl, Context *f
   bufferlist::iterator iter = bl->begin();
   PGLSResponse response;
   ::decode(response, iter);
-  list_context->cookie = (__u64)response.handle;
+  list_context->cookie = (uint64_t)response.handle;
 
   int response_size = response.entries.size();
   dout(20) << "response.entries.size " << response_size
@@ -687,7 +687,7 @@ int Objecter::delete_pool_snap(int pool, string& snapName, Context *onfinish)
   return 0;
 }
 
-int Objecter::create_pool(string& name, Context *onfinish, __u64 auid)
+int Objecter::create_pool(string& name, Context *onfinish, uint64_t auid)
 {
   dout(10) << "create_pool name=" << name << dendl;
   PoolOp *op = new PoolOp;
@@ -730,7 +730,7 @@ int Objecter::delete_pool(int pool, Context *onfinish)
  * on both the pool's current auid and the new (parameter) auid.
  * Uses the standard Context callback when done.
  */
-int Objecter::change_pool_auid(int pool, Context *onfinish, __u64 auid)
+int Objecter::change_pool_auid(int pool, Context *onfinish, uint64_t auid)
 {
   dout(10) << "change_pool_auid " << pool << " to " << auid << dendl;
   PoolOp *op = new PoolOp;
@@ -877,7 +877,7 @@ void Objecter::_sg_read_finish(vector<ObjectExtent>& extents, vector<bufferlist>
                               bufferlist *bl, Context *onfinish)
 {
   // all done
-  __u64 bytes_read = 0;
+  uint64_t bytes_read = 0;
   
   dout(15) << "_sg_read_finish" << dendl;
 
@@ -891,7 +891,7 @@ void Objecter::_sg_read_finish(vector<ObjectExtent>& extents, vector<bufferlist>
      */
     
     // map extents back into buffer
-    map<__u64, bufferlist*> by_off;  // buffer offset -> bufferlist
+    map<uint64_t, bufferlist*> by_off;  // buffer offset -> bufferlist
     
     // for each object extent...
     vector<bufferlist>::iterator bit = resultbl.begin();
@@ -943,11 +943,11 @@ void Objecter::_sg_read_finish(vector<ObjectExtent>& extents, vector<bufferlist>
     }
     
     // sort and string bits together
-    for (map<__u64, bufferlist*>::iterator it = by_off.begin();
+    for (map<uint64_t, bufferlist*>::iterator it = by_off.begin();
         it != by_off.end();
         it++) {
       assert(it->second->length());
-      if (it->first < (__u64)bytes_read) {
+      if (it->first < (uint64_t)bytes_read) {
        dout(21) << "  concat buffer frag off " << it->first << " len " << it->second->length() << dendl;
        bl->claim_append(*(it->second));
       } else {
index a2f751e892b873f7c494db3213b4d940f1ff2f22..d81270f60613ae43816f65ba34e8e6eaff4ee3a5 100644 (file)
@@ -55,7 +55,7 @@ struct ObjectOperation {
     ops.resize(s+1);
     ops[s].op.op = op;
   }
-  void add_data(int op, __u64 off, __u64 len, bufferlist& bl) {
+  void add_data(int op, uint64_t off, uint64_t len, bufferlist& bl) {
     int s = ops.size();
     ops.resize(s+1);
     ops[s].op.op = op;
@@ -84,7 +84,7 @@ struct ObjectOperation {
     ops[s].data.append(method, ops[s].op.cls.method_len);
     ops[s].data.append(indata);
   }
-  void add_pgls(int op, __u64 count, __u64 cookie) {
+  void add_pgls(int op, uint64_t count, uint64_t cookie) {
     int s = ops.size();
     ops.resize(s+1);
     ops[s].op.op = op;
@@ -95,23 +95,23 @@ struct ObjectOperation {
   // ------
 
   // pg
-  void pg_ls(__u64 count, __u64 cookie) {
+  void pg_ls(uint64_t count, uint64_t cookie) {
     add_pgls(CEPH_OSD_OP_PGLS, count, cookie);
     flags |= CEPH_OSD_FLAG_PGOP;
   }
 
   // object data
-  void read(__u64 off, __u64 len) {
+  void read(uint64_t off, uint64_t len) {
     bufferlist bl;
     add_data(CEPH_OSD_OP_READ, off, len, bl);
   }
-  void write(__u64 off, __u64 len, bufferlist& bl) {
+  void write(uint64_t off, uint64_t len, bufferlist& bl) {
     add_data(CEPH_OSD_OP_WRITE, off, len, bl);
   }
   void write_full(bufferlist& bl) {
     add_data(CEPH_OSD_OP_WRITEFULL, 0, bl.length(), bl);
   }
-  void zero(__u64 off, __u64 len) {
+  void zero(uint64_t off, uint64_t len) {
     bufferlist bl;
     add_data(CEPH_OSD_OP_ZERO, off, len, bl);
   }
@@ -243,15 +243,15 @@ public:
 
   struct C_Stat : public Context {
     bufferlist bl;
-    __u64 *psize;
+    uint64_t *psize;
     utime_t *pmtime;
     Context *fin;
-    C_Stat(__u64 *ps, utime_t *pm, Context *c) :
+    C_Stat(uint64_t *ps, utime_t *pm, Context *c) :
       psize(ps), pmtime(pm), fin(c) {}
     void finish(int r) {
       if (r >= 0) {
        bufferlist::iterator p = bl.begin();
-       __u64 s;
+       uint64_t s;
        utime_t m;
        ::decode(s, p);
        ::decode(m, p);
@@ -284,7 +284,7 @@ public:
   // Pools and statistics 
   struct ListContext {
     int current_pg;
-    __u64 cookie;
+    uint64_t cookie;
     int starting_pg_num;
     bool at_end;
 
@@ -340,7 +340,7 @@ public:
     Context *onfinish;
     int pool_op;
     int* replyCode;
-    __u64 auid;
+    uint64_t auid;
 
     utime_t last_submit;
     PoolOp() : tid(0), pool(0), onfinish(0), pool_op(0),
@@ -470,7 +470,7 @@ private:
 
   // high-level helpers
   tid_t stat(const object_t& oid, ceph_object_layout ol, snapid_t snap,
-            __u64 *psize, utime_t *pmtime, int flags, 
+            uint64_t *psize, utime_t *pmtime, int flags, 
             Context *onfinish) {
     vector<OSDOp> ops(1);
     ops[0].op.op = CEPH_OSD_OP_STAT;
@@ -482,7 +482,7 @@ private:
   }
 
   tid_t read(const object_t& oid, ceph_object_layout ol, 
-            __u64 off, __u64 len, snapid_t snap, bufferlist *pbl, int flags,
+            uint64_t off, uint64_t len, snapid_t snap, bufferlist *pbl, int flags,
             Context *onfinish) {
     vector<OSDOp> ops(1);
     ops[0].op.op = CEPH_OSD_OP_READ;
@@ -496,8 +496,8 @@ private:
     return op_submit(o);
   }
   tid_t read_trunc(const object_t& oid, ceph_object_layout ol, 
-            __u64 off, __u64 len, snapid_t snap, bufferlist *pbl, int flags,
-            __u64 trunc_size, __u32 trunc_seq,
+            uint64_t off, uint64_t len, snapid_t snap, bufferlist *pbl, int flags,
+            uint64_t trunc_size, __u32 trunc_seq,
             Context *onfinish) {
     vector<OSDOp> ops(1);
     ops[0].op.op = CEPH_OSD_OP_READ;
@@ -555,7 +555,7 @@ private:
     return op_submit(o);
   }
   tid_t write(const object_t& oid, ceph_object_layout ol,
-             __u64 off, __u64 len, const SnapContext& snapc, const bufferlist &bl,
+             uint64_t off, uint64_t len, const SnapContext& snapc, const bufferlist &bl,
              utime_t mtime, int flags,
               Context *onack, Context *oncommit) {
     vector<OSDOp> ops(1);
@@ -571,9 +571,9 @@ private:
     return op_submit(o);
   }
   tid_t write_trunc(const object_t& oid, ceph_object_layout ol,
-             __u64 off, __u64 len, const SnapContext& snapc, const bufferlist &bl,
+             uint64_t off, uint64_t len, const SnapContext& snapc, const bufferlist &bl,
              utime_t mtime, int flags,
-            __u64 trunc_size, __u32 trunc_seq,
+            uint64_t trunc_size, __u32 trunc_seq,
               Context *onack, Context *oncommit) {
     vector<OSDOp> ops(1);
     ops[0].op.op = CEPH_OSD_OP_WRITE;
@@ -601,7 +601,7 @@ private:
     return op_submit(o);
   }
   tid_t zero(const object_t& oid, ceph_object_layout ol, 
-            __u64 off, __u64 len, const SnapContext& snapc, utime_t mtime, int flags,
+            uint64_t off, uint64_t len, const SnapContext& snapc, utime_t mtime, int flags,
              Context *onack, Context *oncommit) {
     vector<OSDOp> ops(1);
     ops[0].op.op = CEPH_OSD_OP_ZERO;
@@ -672,9 +672,9 @@ public:
   int create_pool_snap(int pool, string& snapName, Context *onfinish);
   int delete_pool_snap(int pool, string& snapName, Context *onfinish);
 
-  int create_pool(string& name, Context *onfinish, __u64 auid=0);
+  int create_pool(string& name, Context *onfinish, uint64_t auid=0);
   int delete_pool(int pool, Context *onfinish);
-  int change_pool_auid(int pool, Context *onfinish, __u64 auid);
+  int change_pool_auid(int pool, Context *onfinish, uint64_t auid);
 
   void handle_pool_op_reply(MPoolOpReply *m);
 
@@ -719,7 +719,7 @@ public:
   };
 
   void sg_read_trunc(vector<ObjectExtent>& extents, snapid_t snap, bufferlist *bl, int flags,
-               __u64 trunc_size, __u32 trunc_seq, Context *onfinish) {
+               uint64_t trunc_size, __u32 trunc_seq, Context *onfinish) {
     if (extents.size() == 1) {
       read_trunc(extents[0].oid, extents[0].layout, extents[0].offset, extents[0].length,
           snap, bl, flags, trunc_size, trunc_seq, onfinish);
@@ -740,7 +740,7 @@ public:
   }
 
   void sg_write_trunc(vector<ObjectExtent>& extents, const SnapContext& snapc, const bufferlist& bl, utime_t mtime,
-               int flags, __u64 trunc_size, __u32 trunc_seq,
+               int flags, uint64_t trunc_size, __u32 trunc_seq,
                Context *onack, Context *oncommit) {
     if (extents.size() == 1) {
       write_trunc(extents[0].oid, extents[0].layout, extents[0].offset, extents[0].length,
index 20a177d08e8db7ff834f06fdd741e1c06356defa..fe1b310905af78810d50a393882882aa62e0d562 100644 (file)
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
     }
   }
 
-  __u64 avg = 0;
+  uint64_t avg = 0;
   for (int i=0; i<n; i++) {
     cout << "osd" << i << "\t" << count[i] << std::endl;
     avg += count[i];
index b6299d92c4bb6d87f685e4293a89f5092ad36bce..e370a65106457bbe9901fc20c1e8829770fd7dd0 100644 (file)
@@ -229,7 +229,7 @@ int main(int argc, const char **argv)
     if (!pool || nargs.size() < 2)
       usage();
 
-    __u64 new_auid = strtol(nargs[1], 0, 10);
+    uint64_t new_auid = strtol(nargs[1], 0, 10);
     ret = rados.change_pool_auid(p, new_auid);
     if (ret < 0) {
       cerr << "error changing auid on pool " << pool << ':'
index 668e20f54ff5d3db751c5e305d5790ef275799c3..97f9a7cb0125f24cd71d3954619933c9fcb1598e 100644 (file)
@@ -77,14 +77,14 @@ void print_header(char *imgname, rbd_obj_header_ondisk *header)
        << std::endl;
 }
 
-void trim_image(const char *imgname, rbd_obj_header_ondisk *header, __u64 newsize)
+void trim_image(const char *imgname, rbd_obj_header_ondisk *header, uint64_t newsize)
 {
-  __u64 size = header->image_size;
-  __u64 numseg = size >> header->obj_order;
-  __u64 start = newsize >> header->obj_order;
+  uint64_t size = header->image_size;
+  uint64_t numseg = size >> header->obj_order;
+  uint64_t start = newsize >> header->obj_order;
 
   cout << "trimming image data from " << numseg << " to " << start << " objects..." << std::endl;
-  for (__u64 i=start; i<numseg; i++) {
+  for (uint64_t i=start; i<numseg; i++) {
     char o[RBD_MAX_SEG_NAME_SIZE];
     sprintf(o, "%s.%012llx", imgname, (unsigned long long)i);
     string oid = o;
@@ -113,7 +113,7 @@ int main(int argc, const char **argv)
 
   bool opt_create = false, opt_delete = false, opt_list = false, opt_info = false, opt_resize = false;
   char *poolname = (char *)"rbd";
-  __u64 size = 0;
+  uint64_t size = 0;
   int order = 0;
   char *imgname;
 
index 9c09fa2558d3e8a44daf5f6e6a6d8a04703cc4f7..aedbdb0b10bc32b4950eeda77c26bb2879cb4f68 100644 (file)
@@ -40,7 +40,7 @@ public:
                            std::string& marker, std::vector<RGWObjEnt>& result, map<string, bool>& common_prefixes) = 0;
 
   /** Create a new bucket*/
-  virtual int create_bucket(std::string& id, std::string& bucket, map<std::string, bufferlist>& attrs, __u64 auid=0) = 0;
+  virtual int create_bucket(std::string& id, std::string& bucket, map<std::string, bufferlist>& attrs, uint64_t auid=0) = 0;
   /** write an object to the storage device in the appropriate pool
     with the given stats */
   virtual int put_obj(std::string& id, std::string& bucket, std::string& obj, const char *data, size_t size,
index 8d40adf7e782b8190c8edf777bb76fe2351ef8fc..1f3558693df47286bf803b1f86044173bd963da1 100644 (file)
@@ -98,7 +98,7 @@ int main(int argc, char **argv)
   bool list_buckets = false;
   bool delete_user = false;
   int actions = 0 ;
-  __u64 auid = 0;
+  uint64_t auid = 0;
   RGWUserInfo info;
   RGWAccess *store;
 
index 20b102ccdd76328c6e2d4840e94482c27c3bcf0b..fa095e83c88de06ec4b29d39fb91164dd3821e9c 100644 (file)
@@ -35,7 +35,7 @@ using namespace std;
 #define RGW_ATTR_CONTENT_TYPE  RGW_ATTR_PREFIX "content_type"
 
 #define USER_INFO_VER 2
-#define CEPH_AUTH_UID_DEFAULT (__u64) -1
+#define CEPH_AUTH_UID_DEFAULT (uint64_t) -1
 
 typedef void *RGWAccessHandle;
 
@@ -107,7 +107,7 @@ class RGWAccessControlPolicy;
 
 struct RGWUserInfo
 {
-  __u64 auid;
+  uint64_t auid;
   string user_id;
   string secret_key;
   string display_name;
@@ -195,7 +195,7 @@ struct RGWObjEnt {
   void encode(bufferlist& bl) const {
     __u8 struct_v = 1;
     ::encode(struct_v, bl);
-    __u64 s = size;
+    uint64_t s = size;
     __u32 mt = mtime;
     ::encode(name, bl);
     ::encode(s, bl);
@@ -205,7 +205,7 @@ struct RGWObjEnt {
     __u8 struct_v;
     ::decode(struct_v, bl);
     __u32 mt;
-    __u64 s;
+    uint64_t s;
     ::decode(name, bl);
     ::decode(s, bl);
     ::decode(mt, bl);
index bbbbb3c94eb6dde3a6dc896675995d6fd219c4e7..aa4c9a9f6490a9eab525cb16d071c37a4e57a387 100644 (file)
@@ -145,7 +145,7 @@ int RGWFS::list_objects(string& id, string& bucket, int max, string& prefix, str
 }
 
 
-int RGWFS::create_bucket(std::string& id, std::string& bucket, map<std::string, bufferlist>& attrs, __u64 auid)
+int RGWFS::create_bucket(std::string& id, std::string& bucket, map<std::string, bufferlist>& attrs, uint64_t auid)
 {
   int len = strlen(DIR_NAME) + 1 + bucket.size() + 1;
   char buf[len];
index 084c5fa5e94bfeeb8b43350325b6cec12ffa1522..87bac4043afb810652d8ffc275a2a093be57ca31 100644 (file)
@@ -13,7 +13,7 @@ public:
   int list_objects(std::string& id, std::string& bucket, int max, std::string& prefix, std::string& delim,
                    std::string& marker, std::vector<RGWObjEnt>& result, map<string, bool>& common_prefixes);
 
-  int create_bucket(std::string& id, std::string& bucket, map<std::string, bufferlist>& attrs, __u64 auid=0);
+  int create_bucket(std::string& id, std::string& bucket, map<std::string, bufferlist>& attrs, uint64_t auid=0);
   int put_obj(std::string& id, std::string& bucket, std::string& obj, const char *data, size_t size,
               time_t *mtime,
              map<std::string, bufferlist>& attrs);
index 8c9b8114aaf54f4180a26ca7be835d0e3db1932d..3c42260e3fda5570a069d868dd8ced4d83a50483 100644 (file)
@@ -184,7 +184,7 @@ int RGWRados::list_objects(string& id, string& bucket, int max, string& prefix,
       }
     }
 
-    __u64 s;
+    uint64_t s;
     if (rados->stat(pool, *p, &s, &obj.mtime) < 0)
       continue;
     obj.size = s;
@@ -207,7 +207,7 @@ int RGWRados::list_objects(string& id, string& bucket, int max, string& prefix,
  * if auid is set, it sets the auid of the underlying rados pool
  * returns 0 on success, -ERR# otherwise.
  */
-int RGWRados::create_bucket(std::string& id, std::string& bucket, map<std::string, bufferlist>& attrs, __u64 auid)
+int RGWRados::create_bucket(std::string& id, std::string& bucket, map<std::string, bufferlist>& attrs, uint64_t auid)
 {
   int ret = rados->create(root_pool, bucket, true);
   if (ret < 0)
@@ -456,7 +456,7 @@ int RGWRados::get_obj(std::string& bucket, std::string& oid,
             struct rgw_err *err)
 {
   int r = -EINVAL;
-  __u64 size, len;
+  uint64_t size, len;
   bufferlist etag;
   time_t mtime;
   bufferlist bl;
index ac4c5a015639e4a0d7a567200e2f79d3fb8da14e..4c8f7b3a769818c3f9ee9a728d33b1d9ed521708 100644 (file)
@@ -28,7 +28,7 @@ public:
    * create a bucket with name bucket and the given list of attrs
    * returns 0 on success, -ERR# otherwise.
    */
-  int create_bucket(std::string& id, std::string& bucket, map<std::string,bufferlist>& attrs, __u64 auid=0);
+  int create_bucket(std::string& id, std::string& bucket, map<std::string,bufferlist>& attrs, uint64_t auid=0);
 
   /** Write/overwrite an object to the bucket storage. */
   int put_obj(std::string& id, std::string& bucket, std::string& obj, const char *data, size_t size,
index 745d9c5c22d46cab3e230f56486ccf0219181ba3..497ba2c663b8cfa0bbeaacd848b2905e0600bbdf 100644 (file)
@@ -41,7 +41,7 @@ Messenger *messenger = 0;
 Mutex lock("mylock");
 Cond cond;
 
-__u64 received = 0;
+uint64_t received = 0;
 
 class Admin : public Dispatcher {
   bool ms_dispatch(Message *m) {
@@ -102,7 +102,7 @@ int main(int argc, const char **argv, const char *envp[]) {
     isend = 100;
 
   lock.Lock();
-  __u64 sent = 0;
+  uint64_t sent = 0;
   while (1) {
     while (received + isend <= sent) {
       //cerr << "wait r " << received << " s " << sent << " is " << isend << std::endl;