Skip to content

Commit

Permalink
osd/bluestore: delete unused variable in KernelDevice
Browse files Browse the repository at this point in the history
Signed-off-by: Leo Zhang <[email protected]>
  • Loading branch information
zealoussnow committed Mar 13, 2018
1 parent 41ec438 commit fc99995
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
9 changes: 1 addition & 8 deletions src/os/bluestore/KernelDevice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ KernelDevice::KernelDevice(CephContext* cct, aio_callback_t cb, void *cbpriv, ai
: BlockDevice(cct, cb, cbpriv),
fd_direct(-1),
fd_buffered(-1),
fs(NULL), aio(false), dio(false),
aio(false), dio(false),
debug_lock("KernelDevice::debug_lock"),
aio_queue(cct->_conf->bdev_aio_max_queue_depth),
discard_callback(d_cb),
Expand Down Expand Up @@ -152,9 +152,6 @@ int KernelDevice::open(const string& p)
}
_discard_start();

fs = FS::create_by_fd(fd_direct);
assert(fs);

// round size down to an even block
size &= ~(block_size - 1);

Expand Down Expand Up @@ -195,10 +192,6 @@ void KernelDevice::close()
_aio_stop();
_discard_stop();

assert(fs);
delete fs;
fs = NULL;

assert(fd_direct >= 0);
VOID_TEMP_FAILURE_RETRY(::close(fd_direct));
fd_direct = -1;
Expand Down
5 changes: 3 additions & 2 deletions src/os/bluestore/KernelDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@

#include <atomic>

#include "os/fs/FS.h"
#include "include/types.h"
#include "include/interval_set.h"
#include "common/Mutex.h"
#include "common/Cond.h"

#include "aio.h"
#include "BlockDevice.h"

class KernelDevice : public BlockDevice {
int fd_direct, fd_buffered;
std::string path;
FS *fs;
bool aio, dio;

std::string devname; ///< kernel dev name (/sys/block/$devname), if any
Expand Down

0 comments on commit fc99995

Please sign in to comment.