]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge commit 'origin/filestore' into unstable
authorSage Weil <sage@newdream.net>
Wed, 17 Feb 2010 22:57:31 +0000 (14:57 -0800)
committerSage Weil <sage@newdream.net>
Wed, 17 Feb 2010 22:57:31 +0000 (14:57 -0800)
Conflicts:

src/os/FileStore.cc
src/os/FileStore.h

1  2 
src/Makefile.am
src/TODO
src/os/FileStore.cc
src/os/FileStore.h
src/os/ObjectStore.h
src/osd/OSD.cc
src/osd/OSD.h
src/osd/PG.cc
src/osd/ReplicatedPG.cc
src/vstart.sh

diff --cc src/Makefile.am
Simple merge
diff --cc src/TODO
index d61544d8385e3dfefdb1bd122df479ad1fd36ad4,5e414dabc9a42a78e3b25cf7a32907d78e4ae47c..6c5cc62366f8def2cdf7c5925194e9e7af4a9d98
+++ b/src/TODO
@@@ -52,13 -46,44 +52,19 @@@ v0.2
  - rebuild mds hierarchy
  - kclient: retry alloc on ENOMEM when reading from connection?
  
+ filestore
+ - throttling
+ - flush objects onto primary during recovery
+ - audit queue_transaction calls for dependencies
+ - convert apply_transaction calls in handle_map to queue?
+   - need an osdmap cache layer?
  
  bugs
 -- kclient: on umount -f
 -[ 4683.361323] INFO: task umount:15840 blocked for more than 120 seconds.
 -[ 4683.367910] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
 -[ 4683.375792] umount        D 0000000000000000     0 15840   2614 0x00000000
 -[ 4683.382761]  ffff880104ee9c58 0000000000000046 0000000000000000 ffffffff8145f50a
 -[ 4683.390297]  ffff88010901aa00 ffff880104ee9fd8 ffff880104ee9fd8 0000000000004000
 -[ 4683.397862]  000000000000df18 ffff880104ee9fd8 ffff880104ee9fd8 00000000001d2d80
 -[ 4683.405414] Call Trace:
 -[ 4683.407911]  [<ffffffff8145f50a>] ? _spin_unlock_irq+0x36/0x51
 -[ 4683.413794]  [<ffffffffa0166867>] ? check_cap_flush+0xa4/0x235 [ceph]
 -[ 4683.420285]  [<ffffffff8145dbc6>] mutex_lock_nested+0x1b9/0x317
 -[ 4683.426255]  [<ffffffffa0166867>] ? check_cap_flush+0xa4/0x235 [ceph]
 -[ 4683.432769]  [<ffffffffa0166867>] check_cap_flush+0xa4/0x235 [ceph]
 -[ 4683.439090]  [<ffffffffa0167c2c>] ceph_mdsc_sync+0x186/0x303 [ceph]
 -[ 4683.445396]  [<ffffffff8145d8b6>] ? mutex_unlock+0x9/0xb
 -[ 4683.450766]  [<ffffffffa0171832>] ? ceph_osdc_sync+0xe4/0x170 [ceph]
 -[ 4683.457188]  [<ffffffffa01478f4>] ceph_syncfs+0x4e/0xc8 [ceph]
 -[ 4683.469161]  [<ffffffff810f6084>] __sync_filesystem+0x5e/0x72
 -[ 4683.474968]  [<ffffffff810f6231>] sync_filesystem+0x35/0x4c
 -[ 4683.480596]  [<ffffffff810d89d8>] generic_shutdown_super+0x28/0xcd
 -[ 4683.486831]  [<ffffffff810d8ac8>] kill_anon_super+0x11/0x4f
 -[ 4683.492474]  [<ffffffffa01473eb>] ceph_kill_sb+0x4d/0xa3 [ceph]
 -[ 4683.498453]  [<ffffffff810d8e5c>] ? deactivate_super+0x60/0x7d
 -[ 4683.504344]  [<ffffffff810d8e64>] deactivate_super+0x68/0x7d
 -[ 4683.510067]  [<ffffffff810ecf58>] mntput_no_expire+0x78/0xb3
 -[ 4683.515784]  [<ffffffff810ed518>] sys_umount+0x2b2/0x2df
 -[ 4683.521159]  [<ffffffff810298f0>] ? do_page_fault+0x104/0x278
 -[ 4683.526947]  [<ffffffff8100baeb>] system_call_fastpath+0x16/0x1b
 +- dbench 1, restart mds (may take a few times), dbench will error out.
 +
 +- rm -r failure (on kernel tree)
  
 -- bonnie++ -u root -d /mnt/ceph/ -s 0 -n 1
 +?- bonnie++ -u root -d /mnt/ceph/ -s 0 -n 1
  (03:35:29 PM) Isteriat: Using uid:0, gid:0.
  (03:35:29 PM) Isteriat: Create files in sequential order...done.
  (03:35:29 PM) Isteriat: Stat files in sequential order...Expected 1024 files but only got 0
index 1c60267273b32f9d3ba170c9dd93b5e2db31346f,febf4407b387f5549b79c76e27889d8ec1759368..1e6397a4dc9d1c03d5f013bff78d5bfa4aa2a47a
@@@ -357,44 -357,11 +357,28 @@@ int FileStore::lock_fsid(
    return 0;
  }
  
- int FileStore::mount() 
 +bool FileStore::test_mount_in_use()
 +{
 +  dout(5) << "test_mount basedir " << basedir << " journal " << journalpath << dendl;
 +  char fn[PATH_MAX];
 +  snprintf(fn, sizeof(fn), "%s/fsid", basedir.c_str());
 +
 +  // verify fs isn't in use
 +
 +  fsid_fd = ::open(fn, O_RDWR, 0644);
 +  if (fsid_fd < 0)
 +    return 0;   // no fsid, ok.
 +  bool inuse = lock_fsid() < 0;
 +  ::close(fsid_fd);
 +  fsid_fd = -1;
 +  return inuse;
 +}
 +
+ int FileStore::_detect_fs()
  {
    char buf[80];
-   if (g_conf.filestore_dev) {
-     dout(0) << "mounting" << dendl;
-     char cmd[100];
-     snprintf(cmd, sizeof(cmd), "mount %s", g_conf.filestore_dev);
-     //system(cmd);
-   }
-   dout(5) << "basedir " << basedir << " journal " << journalpath << dendl;
-   
-   // make sure global base dir exists
-   struct stat st;
-   int r = ::stat(basedir.c_str(), &st);
-   if (r != 0) {
-     derr(0) << "unable to stat basedir " << basedir << ", " << strerror_r(errno, buf, sizeof(buf)) << dendl;
-     return -errno;
-   }
    
+   // fake collections?
    if (g_conf.filestore_fake_collections) {
      dout(0) << "faking collections (in memory)" << dendl;
      fake_collections = true;
index 6cceed96b9adf5f32d051eeb596a5431c49ae31a,9595c070b27b0fd924c1da1ebdc39909299fb14a..0be9e2228f928d5a0f152f7079f9d7c7094d509a
@@@ -104,9 -166,18 +166,19 @@@ class FileStore : public JournalingObje
      attrs(this), fake_attrs(false), 
      collections(this), fake_collections(false),
      lock("FileStore::lock"),
-     sync_epoch(0), stop(false), sync_thread(this), flusher_queue_len(0), flusher_thread(this) { }
+     sync_epoch(0), stop(false), sync_thread(this),
+     op_queue_len(0), op_queue_bytes(0), next_finish(0),
+     op_tp("FileStore::op_tp", g_conf.filestore_op_threads), op_wq(this, &op_tp),
+     flusher_queue_len(0), flusher_thread(this) {
+     // init current_fn
+     snprintf(current_fn, sizeof(current_fn), "%s/current", basedir.c_str());
+     snprintf(current_op_seq_fn, sizeof(current_op_seq_fn), "%s/current/commit_op_seq", basedir.c_str());
+   }
  
+   int _detect_fs();
+   int _sanity_check_fs();
+   
 +  bool test_mount_in_use();
    int mount();
    int umount();
    int mkfs();
Simple merge
diff --cc src/osd/OSD.cc
Simple merge
diff --cc src/osd/OSD.h
Simple merge
diff --cc src/osd/PG.cc
Simple merge
Simple merge
diff --cc src/vstart.sh
Simple merge