From: xie xingguo Date: Wed, 31 Aug 2016 01:55:04 +0000 (+0800) Subject: os/bluestore/bluefs: update mtime of inode in unified path X-Git-Tag: v11.0.1~350^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3ea32042dd0423b5682ddcce74a5f549c086cc14;p=ceph.git os/bluestore/bluefs: update mtime of inode in unified path To reduce code redundancy. Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 2b4cec5dec3d..8268c5632ec0 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -156,7 +156,7 @@ int BlueFS::reclaim_blocks(unsigned id, uint64_t want, { std::unique_lock l(lock); dout(1) << __func__ << " bdev " << id - << " want 0x" << std::hex << want << std:: dec << dendl; + << " want 0x" << std::hex << want << std::dec << dendl; assert(id < alloc.size()); assert(alloc[id]); int r = alloc[id]->reserve(want); @@ -1770,7 +1770,6 @@ int BlueFS::open_for_write( } file = new File; file->fnode.ino = ++ino_last; - file->fnode.mtime = ceph_clock_now(NULL); file_map[ino_last] = file; dir->file_map[filename] = file; ++file->refs; @@ -1792,9 +1791,9 @@ int BlueFS::open_for_write( } file->fnode.extents.clear(); } - file->fnode.mtime = ceph_clock_now(NULL); } + file->fnode.mtime = ceph_clock_now(NULL); file->fnode.prefer_bdev = BlueFS::BDEV_DB; if (dirname.length() > 5) { // the "db.slow" and "db.wal" directory names are hard-coded at