Skip to content

mds: make the lost+found dir accessible from clients#40903

Merged
batrick merged 3 commits intoceph:masterfrom
lxbsz:wip-50216-lostfound
May 4, 2021
Merged

mds: make the lost+found dir accessible from clients#40903
batrick merged 3 commits intoceph:masterfrom
lxbsz:wip-50216-lostfound

Conversation

@lxbsz
Copy link
Member

@lxbsz lxbsz commented Apr 19, 2021

Inode number 0x4 is reserved for the lost+found dir, and the app
or test app need to access it.

Fixes: https://tracker.ceph.com/issues/50216
Signed-off-by: Xiubo Li xiubli@redhat.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@github-actions github-actions bot added the cephfs Ceph File System label Apr 19, 2021
@lxbsz lxbsz requested review from a team, batrick and jtlayton April 19, 2021 02:37
@lxbsz lxbsz added the bug-fix label Apr 19, 2021
@lxbsz lxbsz force-pushed the wip-50216-lostfound branch from 7fa7cff to deea37a Compare April 19, 2021 04:42
Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job trackign this down!

Xiubo, can you also add a trivial libcephfs test to lookup:

  • root (0x1)
  • lost+found (0x4) even if ENOENT
  • .ceph (0x2)

Copy link
Contributor

@jtlayton jtlayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. It kind of sucks that we have a mix of inodes in this range that are accessible via the client and some that aren't, but I think we're stuck with it.

@lxbsz
Copy link
Member Author

lxbsz commented Apr 20, 2021

Great job trackign this down!

Xiubo, can you also add a trivial libcephfs test to lookup:

  • root (0x1)
  • lost+found (0x4) even if ENOENT
  • .ceph (0x2)

Sure, I will add it.

@lxbsz lxbsz force-pushed the wip-50216-lostfound branch from deea37a to e77be2d Compare April 20, 2021 03:48
@github-actions github-actions bot added the tests label Apr 20, 2021
@lxbsz lxbsz requested review from batrick and jtlayton April 20, 2021 03:50
@lxbsz
Copy link
Member Author

lxbsz commented Apr 20, 2021

jenkins test make check

@lxbsz lxbsz force-pushed the wip-50216-lostfound branch from e77be2d to fb194b8 Compare April 20, 2021 06:24
@jtlayton jtlayton self-requested a review April 20, 2021 13:55
@lxbsz
Copy link
Member Author

lxbsz commented Apr 22, 2021

@batrick

Updated it by fixing the issue pointed out by Luis in kclient, the ino 0x3 will also be lookuped by clients too when checking the snamrealm inos.

@batrick
Copy link
Member

batrick commented Apr 22, 2021

ACK

@github-actions
Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

lxbsz added 2 commits April 28, 2021 09:28
For inos 1 and 2 there has two places are defining them, to make
sure we won't miss any one of them, let's define them in only one
header file.

Fixes: https://tracker.ceph.com/issues/50216
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Inode number 0x4 is reserved for the lost+found dir, and the apps
or recovery apps need to access it.

At the same time the 0x3 is reserved for the global snaprealm, which
will also be lookup by the clients when looking up the snaprealm inodes.

Here will make all the inode less than 100 accessible by clients.

Fixes: https://tracker.ceph.com/issues/50216
Signed-off-by: Xiubo Li <xiubli@redhat.com>
@lxbsz lxbsz force-pushed the wip-50216-lostfound branch from 3030f16 to 0ec4d78 Compare April 28, 2021 01:53
@lxbsz
Copy link
Member Author

lxbsz commented Apr 28, 2021

Rebased to upstream by fixing the conflicts in test/libcephfs/test.cc.

@batrick
Copy link
Member

batrick commented May 4, 2021

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants