New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/filestore: use existing variable for same func. #13742

Merged
merged 1 commit into from Mar 7, 2017

Conversation

Projects
None yet
2 participants
@liupan1111
Contributor

liupan1111 commented Mar 2, 2017

Use existing conf_journal_sz to replace new_size.

Signed-off-by: Pan Liu liupan1111@gmail.com

@liupan1111

This comment has been minimized.

Contributor

liupan1111 commented Mar 2, 2017

@tchaikov , please take a look.

@liupan1111 liupan1111 requested a review from tchaikov Mar 2, 2017

@liupan1111 liupan1111 added the cleanup label Mar 2, 2017

newsize <<= 20;
dout(10) << "_open extending to " << newsize << " bytes" << dendl;
ret = ::ftruncate(fd, newsize);
dout(10) << "_open extending to " << conf_journal_sz << " bytes" << dendl;

This comment has been minimized.

@tchaikov

tchaikov Mar 3, 2017

Contributor

use __func__ if you please.

This comment has been minimized.

@tchaikov

tchaikov Mar 3, 2017

Contributor

also i'd suggest continue using new_size but initialize it using

const uint64_t newsize(conf_journal_sz);

as it helps with the readability, imo.

This comment has been minimized.

@liupan1111

liupan1111 Mar 3, 2017

Contributor
  1. yes, func is useful for a log info, I will create a new commit for it in same pr, since it is not related to the first topic.

  2. agree. The purpose of my commit is: I just hate to <<=20 twice for same value ...

This comment has been minimized.

@tchaikov

tchaikov Mar 3, 2017

Contributor

we can have them in the same commit. no need to have a dedicated one.

This comment has been minimized.

@liupan1111

liupan1111 Mar 3, 2017

Contributor

ok, sure

@liupan1111

This comment has been minimized.

Contributor

liupan1111 commented Mar 6, 2017

@tchaikov updated.

os/filestore: use existing variable to assign newsize.
Signed-off-by: Pan Liu <liupan1111@gmail.com>
@tchaikov

This comment has been minimized.

@tchaikov tchaikov merged commit a07452d into ceph:master Mar 7, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@liupan1111 liupan1111 deleted the liupan1111:wip-cleanup-journal branch Mar 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment