Commit Graph

2711 Commits

Author SHA1 Message Date
Sage Weil
e3dc7c772f os/ObjectStore: fix _update_op for split dest_cid
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-29 15:24:59 -04:00
Sage Weil
fc7942bfd0 Merge pull request #8359 from athanatos/wip-15205
os/ObjectStore: try_move_rename in transaction append and add coverage to store_test

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-29 14:22:51 -04:00
Samuel Just
5bf281e92c Transaction: handle OP_TRY_RENAME in dump
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-29 11:13:53 -07:00
Samuel Just
eb9e80c94f ObjectStore::Transaction::_update_op: handle OP_TRY_RENAME
Fixes: http://tracker.ceph.com/issues/15205
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-29 11:13:35 -07:00
Sage Weil
c40d90df06 Merge pull request #8292 from vshankar/bluefs-tool-fix
os/bluestore: ceph-bluefs-tool fixes

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-29 13:47:26 -04:00
Venky Shankar
ec6f108df5 os/bluestore: ceph-bluefs-tool fixes
Couple of fixes:
- check vector size before using
- fix assert() failure after write_fd()

Fixes: #15261
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2016-03-24 15:52:02 +05:30
Jianpeng Ma
525a42b53c os/bluestore/BlueStore.cc: when do omapclear, it should clear omap_head.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-03-24 17:59:44 +08:00
Sage Weil
a10b059537 Merge pull request #8101 from jjhuo/bluestore
os/bluestore: small fixes in bluestore StupidAllocator

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-19 09:13:02 -04:00
Sage Weil
57cd121e9e Merge pull request #8178 from majianpeng/bluefs-closewriter
os/bluestore/BlueFS: Before reap ioct, it should wait io complete

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-19 09:11:56 -04:00
Sage Weil
8b9ed00812 os/filestore: fix warning
os/filestore/FileStore.cc: In member function ‘int FileStore::_zero(const coll_t&, const ghobject_t&, uint64_t, size_t)’:
os/filestore/FileStore.cc:3294:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (offset + len > st.st_size) {
                        ^

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-18 10:16:49 -04:00
Sage Weil
3ea63bbecf Merge pull request #7721 from xiexingguo/xxg-wip-fixdc
os/filestore: fix result handling logic of destroy_collection

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-17 21:55:11 -04:00
Sage Weil
122e6d6be9 Merge pull request #8160 from yuyuyu101/jewel-spdk
os/bluestore/NVMEDevice: make IO thread using dpdk launch
2016-03-17 21:47:57 -04:00
Sage Weil
b0a90a82c5 Merge pull request #7674 from majianpeng/bluestore-sync-transaction
os/bluestore: make bluestore_sync_transaction = true can work.

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-17 17:59:47 -04:00
Sage Weil
fd61b503e9 Merge pull request #7860 from majianpeng/bluestores-clone-overlay
os/bluestore: clone overlay data

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-17 17:59:26 -04:00
Sage Weil
6741606ebb Merge pull request #7957 from majianpeng/bluestore-read
os/filestore: require offset == length == 0 for full object read; add test

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2016-03-17 17:57:01 -04:00
Jianpeng Ma
30e0f92074 os/bluestore/BlueFS: Before reap ioct, it should wait io complete.
When change write mode of FileWrite(in _flush_range) from buffer to
direct. osd met segment fault.
This because call _close_writer don't check related ios whether
complete.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-03-18 00:18:48 +08:00
Jianjian Huo
06d22ef163 os/bluestore: rename need_size to want_size in StupidAllocator.
Allocate() could return extent with size < need_size, so rename it per
Sage's suggestion.

Signed-off-by: Jianjian Huo <samuel.huo@gmail.com>
2016-03-16 23:09:28 -07:00
Jianjian Huo
d571be2305 os/bluestore: avoid duplicated searches during allocating free extents
When StupidAllocator searches for free extents, if hint is not 0(most times),
it will search extents starting from hint and up in each applicable bin,
if not found, then search all extents in those bins again.

If the extent to find(>= needs) exists below hint and is not in the choose_bin(),
let's say it's in the bin_X; then during this twice searches, all extents from
hint and up in bins before bin_X will be searched twice. This patch will eliminate
those unnecessary searches.

Signed-off-by: Jianjian Huo <samuel.huo@gmail.com>
2016-03-16 23:09:28 -07:00
Haomai Wang
35afd5afab bluestore/NVMEDevice: make IO thread using dpdk launch
Previously we will call rte_eal_init in caller thread as well as dpdk
resources will init in that thread. It will cause all threads spawned
later will bind to the specified core.

And io thread will be spawned via dpdk api, otherwise, dpdk memory
has huge performance degraded problem.

Signed-off-by: Haomai Wang <haomai@xsky.com>
2016-03-16 22:36:04 +08:00
Sage Weil
7fb0fe568d Merge pull request #8136 from athanatos/wip-split-lfn
osd: filestore: fix race condition with split vs collection_move_rename and long object names

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-15 14:16:22 -04:00
xie xingguo
80dc45445a os/filestore: fix result code overwritten
So it reflects the real error number.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-03-15 21:56:57 +08:00
xie xingguo
736a94413f os/filestore: make sloppy_crc can catch fatal error for read()
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-03-15 21:56:56 +08:00
xie xingguo
ccb395dd84 os/filestore: fix result code overwritten for snapshot()
The create_checkpoint() is not a standard system-call, it may return
some customized error code, thus no conversion is needed here.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-03-15 21:56:55 +08:00
xie xingguo
ca2f2b104e os/filestore: fast exit if we fail to load exomap
Also move the definition of 'written' ahead to make
old-compiler happy. In my local testbed, it keeps
complaining "crosses initialization of ‘int64_t written’"
accompanying with this change.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-03-15 21:56:54 +08:00
xie xingguo
de3e3a9e14 os/filestore: remove duplicated lfn_close to same fd
At present lfn_close is a noop, so duplicated call to lfn_close
does no harm and this patch only tries to tidy up.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-03-15 21:53:54 +08:00
xie xingguo
bbde2f0d27 os/filestore: exit if we fail to remove any xattr
The problem here is if we fail to remove one of the existing xattr
stored with fd, and we spill out more xattrs to ObjectMap, we'll
go on to cleaning up the remaining xattrs in ObjectMap, and thus
the real failure might be covered.

This commit solves the above problem by making a quick exit if
we fail to remove any xattr bound with file.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-03-15 21:53:53 +08:00
Sage Weil
34ff39fa2f Merge pull request #8057 from liewegas/wip-pglog-warning
osd/PGLog: fix warning

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-03-15 08:34:29 -04:00
Jianpeng Ma
0e1cc016e9 os/bluestore: only bluestore_sync_transaction = false &
bluestore_sync_submit_transaction = false, it submit transaction.

If bluestore_sync_transaction = true and
bluestore_sync_submit_transaction = false, it will submit 2 times.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-03-15 17:14:51 +08:00
Jianpeng Ma
b45a7b73f0 os/bluestore: make fm alloca/release w/ other kv ops in the same transaction
For bluestore_sync_transaction = true, first update metadata into kv and
then update fm alloca/release infos. If Before updating fm, the host
power off, it make bluestore inconformity.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-03-15 17:14:51 +08:00
Jianpeng Ma
22bcac998e os/bluestore: fix deadlock for bluestore_sync_transaction = true.
In _txc_finish_io, it get the lock of osr and call _txc_state_proc.
If bluestore_sync_transaction == true adn txd->wal_txn == null, it will
call _txc_finish which need get lock of osr. So the deadlock occru.
The simple wal is put txc in kv_queue whether sync or async.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-03-15 17:14:51 +08:00
Samuel Just
850ce11ea3 LFNIndex::lfn_translate: consider alt attr as well
If the file has an alt attr, there are two possible matching
ghobjects.  We want to make sure we choose the right one for
the short name we have.  If we don't, a split while there are
two objects linking to the same inode will result in one of
the links being orphaned in the source directory, resulting
in #14766.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-14 10:25:30 -07:00
Samuel Just
aec5560887 LFNIndex::created: fix return value with failure injection
See comment for explanation.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-14 10:25:29 -07:00
Jianpeng Ma
80f3bc7867 os/filestore/FileStore: only offset=len=0 mean read all data of object.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-03-14 23:42:39 +08:00
Sage Weil
2f24cf9da0 Merge pull request #8035 from liewegas/wip-bluestore
osd: bluestore updates, scrub fixes

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-03-14 10:50:58 -04:00
Sage Weil
8c9190fae6 Merge pull request #8050 from liewegas/wip-15077
os/filestore: fix punch hole usage in _zero

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-03-14 10:50:06 -04:00
Sage Weil
af0e063576 Merge pull request #7870 from stiopaa1/blueStoreRemoveIncludes
osd: bluestore: remove unneeded includes

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-14 09:59:52 -04:00
Kefu Chai
0d6d340087 Merge pull request #7170 from trociny/wip-freebsd-misc
FreeBSD related fixes

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-03-14 17:38:05 +08:00
Samuel Just
ba4badf491 FileStore: fix initialization order for m_disable_wbthrottle
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-11 15:16:37 -08:00
Samuel Just
1cf29067e0 Merge pull request #7752 from somnathr/wip-odsync-write
FileStore: Added O_DSYNC write scheme

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-11 13:47:38 -08:00
Sage Weil
1b897a9688 os/bluestore/KernelDevice: fix signed/unsigned warning
os/bluestore/KernelDevice.cc: In member function ‘virtual int KernelDevice::open(std::string)’:
os/bluestore/KernelDevice.cc:128:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (block_size != st.st_blksize) {

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-11 13:34:14 -05:00
Sage Weil
d963eb72ec os/ObjectStore: drop collection attr deprecated warnings
Can't silent these and we have no users left.  They'll be removed
soon, but I'm tired of sifting through all the warnings.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-11 13:33:21 -05:00
Sage Weil
55a66975ef os/filestore: add filestore_punch_hole = false option
Make punch hole usage optional.

Default to off, since it's relatively untested.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-11 11:13:02 -05:00
Sage Weil
400975b09e os/filestore: fix punch hole usage in _zero
If we punch a hole that extends past EOF, ObjectStore semantics are
that the file size is also extended.  Do that.

Note that this bug was hidden before because we weren't passing
KEEP_SIZE to fallocate until 7bd95b595f
and the fallocate was *always* failing with EOPNOTSUPP (making us fall
back to writing actual zeros).

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-11 11:02:58 -05:00
Sage Weil
19e6b643f0 os/bluestore: ref ovec for CLONE, CLONERANGE
This keeps ovec up to date.  Marginally more efficient.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-11 10:41:39 -05:00
Sage Weil
35f6c5c9ac os/bluestore: fix OP_TRY_RENAME
We don't need to create the dest onode.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-11 10:41:39 -05:00
Sage Weil
f2f0e7d75d os/bluestore: fix _rename
Update the *target* object ref in ovec.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-11 10:41:38 -05:00
Sage Weil
6dcc499865 os/memstore: assert src and dst collection match on rename
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-11 10:41:38 -05:00
Sage Weil
e8b94aec4f os/filestore: make read replace (not append) to result bl
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-11 10:41:38 -05:00
Sage Weil
a2ecb1a88f os/bluestore/BlueStore: do not cow_rmw_tail at or past eof
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-11 10:41:38 -05:00
Sage Weil
3dcadb43e8 os/bluestore: print debug on ENOTEMPTY
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-11 10:41:38 -05:00