Skip to content

Conversation

@lxbsz
Copy link
Member

@lxbsz lxbsz commented Apr 11, 2022

The glibc has defined its own STATX SYNC related flags:

define AT_STATX_SYNC_TYPE 0x6000
define AT_STATX_SYNC_AS_STAT 0x0000
define AT_STATX_FORCE_SYNC 0x2000
define AT_STATX_DONT_SYNC 0x4000

Just switch to use the stardard ones.

And from the posix and the initial statx supporting commit comments,
the AT_STATX_DONT_SYNC is a lightweight stat flag and the
AT_STATX_FORCE_SYNC is a heaverweight one. And also checked all
the other current usage about these two flags they are all doing
the same, that is only when the AT_STATX_FORCE_SYNC is not set
and the AT_STATX_DONT_SYNC is set will they skip sync retriving
the attributes from storage.

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

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
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 dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@lxbsz lxbsz requested a review from a team April 11, 2022 02:55
@github-actions github-actions bot added cephfs Ceph File System tests labels Apr 11, 2022
Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

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

Looks reasonable.

{
unsigned mask = 0;

/* if NO_ATTR_SYNC is set, then we don't need any -- just use what's in cache */
Copy link
Contributor

Choose a reason for hiding this comment

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

fix in comment too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, will fix it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@lxbsz
Copy link
Member Author

lxbsz commented Apr 13, 2022

Updated it also by fixing the comments in following two files:

src/include/cephfs/libcephfs.h
src/pybind/cephfs/cephfs.pyx

Copy link
Contributor

@kotreshhr kotreshhr left a comment

Choose a reason for hiding this comment

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

nit:typo s/stardard/standard/

Looks good to me otherwise.

@lxbsz
Copy link
Member Author

lxbsz commented Apr 18, 2022

nit:typo s/stardard/standard/

Sure, will fix it. Thanks @kotreshhr

Looks good to me otherwise.

lxbsz added 2 commits April 19, 2022 14:37
The glibc has defined its own STATX SYNC related flags:

  define AT_STATX_SYNC_TYPE    0x6000
  define AT_STATX_SYNC_AS_STAT 0x0000
  define AT_STATX_FORCE_SYNC   0x2000
  define AT_STATX_DONT_SYNC    0x4000

Just switch to use the standard ones.

Fixes: https://tracker.ceph.com/issues/55253
Signed-off-by: Xiubo Li <xiubli@redhat.com>
From the posix and the initial statx supporting commit comments,
the AT_STATX_DONT_SYNC is a lightweight stat flag and the
AT_STATX_FORCE_SYNC is a heaverweight one. And also checked all
the other current usage about these two flags they are all doing
the same, that is only when the AT_STATX_FORCE_SYNC is not set
and the AT_STATX_DONT_SYNC is set will they skip sync retriving
the attributes from storage.

Fixes: https://tracker.ceph.com/issues/55253
Signed-off-by: Xiubo Li <xiubli@redhat.com>
@gregsfortytwo
Copy link
Member

@lxbsz is this ready for qa or are you waiting on something? :)

@lxbsz lxbsz added the needs-qa label Apr 22, 2022
@lxbsz
Copy link
Member Author

lxbsz commented Apr 22, 2022

@lxbsz is this ready for qa or are you waiting on something? :)

Yeah, it's ready to qa.

@vshankar
Copy link
Contributor

vshankar commented May 5, 2022

jenkins test make check

1 similar comment
@vshankar
Copy link
Contributor

jenkins test make check

Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

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

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.

4 participants