a problem about FileStore::_destroy_collection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



an ENOTEMPTY error mybe happen when removing a pg in previous versions,but the error is hidden in new versions。

_destroy_collection maybe return 0 when get_index or prep_delete return < 0;

is this intended?

int FileStore::_destroy_collection(coll_t c) 
{
  int r = 0;                             //global r
  char fn[PATH_MAX];
  get_cdir(c, fn, sizeof(fn));
  dout(15) << "_destroy_collection " << fn << dendl;
  {
    Index from;
    int r = get_index(c, &from);            //local r
    if (r < 0)
      goto out;
    assert(NULL != from.index);
    RWLock::WLocker l((from.index)->access_lock);

    r = from->prep_delete();
    if (r < 0)
      goto out;
  }
  r = ::rmdir(fn);
  if (r < 0) {
    r = -errno;
    goto out;
  }

 out:
  // destroy parallel temp collection, too
  ...

 out_final:
  dout(10) << "_destroy_collection " << fn << " = " << r << dendl;
  return r;
}
?韬{.n?????%??檩??w?{.n????u朕?Ф?塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux