]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
fix object_stripe_unit -> stripe_unit
authorSage Weil <sage@newdream.net>
Wed, 30 Sep 2009 19:09:11 +0000 (12:09 -0700)
committerSage Weil <sage@newdream.net>
Wed, 30 Sep 2009 19:09:11 +0000 (12:09 -0700)
src/client/Client.cc
src/osd/OSDMap.h
src/osdc/Filer.cc
src/osdc/Journaler.cc

index 07202eb6460320d723bb319ff4dca5303b6382e3..99612e2ad40791a0819514732d2e144a669489cc 100644 (file)
@@ -3505,7 +3505,7 @@ int Client::fill_stat(Inode *in, struct stat *st, frag_info_t *dirstat, nest_inf
     st->st_size = in->size;
     st->st_blocks = (in->size + 511) >> 9;
   }
-  st->st_blksize = MAX(in->layout.fl_object_stripe_unit, 4096);
+  st->st_blksize = MAX(in->layout.fl_stripe_unit, 4096);
 
   if (dirstat)
     *dirstat = in->dirstat;
@@ -3566,7 +3566,7 @@ int Client::fill_stat_precise(Inode *in, struct stat_precise *st, frag_info_t *d
     st->st_size = in->size;
     st->st_blocks = (in->size + 511) >> 9;
   }
-  st->st_blksize = MAX(in->layout.fl_object_stripe_unit, 4096);
+  st->st_blksize = MAX(in->layout.fl_stripe_unit, 4096);
 
   if (dirstat)
     *dirstat = in->dirstat;
@@ -4348,7 +4348,7 @@ int Client::_read_async(Fh *f, __u64 off, __u64 len, bufferlist *bl)
       l -= (off+l) % p;
     else {
       // align readahead with stripe unit if we cross su boundary
-      int su = in->layout.fl_object_stripe_unit;
+      int su = in->layout.fl_stripe_unit;
       if ((off+l)/su != off/su) l -= (off+l) % su;
     }
     
@@ -5815,14 +5815,14 @@ int Client::get_file_stripe_unit(int fd)
 {
   ceph_file_layout layout;
   describe_layout(fd, &layout);
-  return layout.fl_object_stripe_unit;
+  return layout.fl_stripe_unit;
 }
 
 int Client::get_file_stripe_width(int fd)
 {
   ceph_file_layout layout;
   describe_layout(fd, &layout);
-  return layout.fl_object_stripe_unit * layout.fl_stripe_count;
+  return layout.fl_stripe_unit * layout.fl_stripe_count;
 }
 
 int Client::get_file_stripe_period(int fd)
index a35d92a29f8235c9bfaba22b2be55948f9f54091..550ea53f2f557644310f4484a20a531ee66d6ec9 100644 (file)
@@ -632,7 +632,7 @@ private:
   ceph_object_layout file_to_object_layout(object_t oid, ceph_file_layout& layout) {
     return make_object_layout(oid, layout.fl_pg_pool,
                              layout.fl_pg_preferred,
-                             layout.fl_object_stripe_unit);
+                             layout.fl_stripe_unit);
   }
 
   ceph_object_layout make_object_layout(object_t oid, int pg_pool, int preferred=-1, int object_stripe_unit = 0) {
index 50b8b3ab901252d73b99a2b13ada572b3dc46c5e..0e6879636a573ade11606790f9d2b726d04a4a6c 100644 (file)
@@ -226,7 +226,7 @@ void Filer::file_to_extents(inodeno_t ino, ceph_file_layout *layout,
   map< object_t, ObjectExtent > object_extents;
   
   __u32 object_size = layout->fl_object_size;
-  __u32 su = layout->fl_object_stripe_unit;
+  __u32 su = layout->fl_stripe_unit;
   __u32 stripe_count = layout->fl_stripe_count;
   assert(object_size >= su);
   __u64 stripes_per_object = object_size / su;
index 9dc2c5b06e9217e97ff9e3a00eeb977379d5de00..d4111578e09a5b512a9ba892fd8e9167b581f78b 100644 (file)
@@ -315,7 +315,7 @@ __s64 Journaler::append_entry(bufferlist& bl)
 
   if (!g_conf.journaler_allow_split_entries) {
     // will we span a stripe boundary?
-    int p = layout.fl_object_stripe_unit;
+    int p = layout.fl_stripe_unit;
     if (write_pos / p != (write_pos + (__s64)(bl.length() + sizeof(s))) / p) {
       // yes.
       // move write_pos forward.
@@ -357,7 +357,7 @@ __s64 Journaler::append_entry(bufferlist& bl)
   write_pos += sizeof(s) + s;
 
   // flush previous object?
-  int su = layout.fl_object_stripe_unit;
+  int su = layout.fl_stripe_unit;
   int write_off = write_pos % su;
   int write_obj = write_pos / su;
   int flush_obj = flush_pos / su;