mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
Merge pull request #69466 from kotreshhr/fs-mirror-stale-stat-size
tools/cephfs-mirror: Fix truncated sync from stale crawl-time file size Reviewed-by: Venky Shankar <vshankar@redhat.com>
This commit is contained in:
commit
1bc793d81c
@ -2468,7 +2468,7 @@ int PeerReplayer::SnapDiffSync::init_sync() {
|
||||
int r = ceph_fstatx(m_local, m_fh->c_fd, &tstx,
|
||||
CEPH_STATX_MODE | CEPH_STATX_UID | CEPH_STATX_GID |
|
||||
CEPH_STATX_SIZE | CEPH_STATX_ATIME | CEPH_STATX_MTIME,
|
||||
AT_STATX_DONT_SYNC | AT_SYMLINK_NOFOLLOW);
|
||||
AT_SYMLINK_NOFOLLOW);
|
||||
if (r < 0) {
|
||||
derr << ": failed to stat snap=" << m_current.first << ": " << cpp_strerror(r)
|
||||
<< dendl;
|
||||
@ -2635,7 +2635,7 @@ int PeerReplayer::SnapDiffSync::get_entry(std::string *epath, struct ceph_statx
|
||||
r = ceph_statxat(m_local, m_fh->c_fd, _epath.c_str(), &estx,
|
||||
CEPH_STATX_MODE | CEPH_STATX_UID | CEPH_STATX_GID |
|
||||
CEPH_STATX_SIZE | CEPH_STATX_ATIME | CEPH_STATX_MTIME,
|
||||
AT_STATX_DONT_SYNC | AT_SYMLINK_NOFOLLOW);
|
||||
AT_SYMLINK_NOFOLLOW);
|
||||
if (r < 0) {
|
||||
derr << ": failed to stat epath=" << epath << ", r=" << r << dendl;
|
||||
return r;
|
||||
@ -2811,7 +2811,7 @@ int PeerReplayer::RemoteSync::init_sync() {
|
||||
int r = ceph_fstatx(m_local, m_fh->c_fd, &tstx,
|
||||
CEPH_STATX_MODE | CEPH_STATX_UID | CEPH_STATX_GID |
|
||||
CEPH_STATX_SIZE | CEPH_STATX_ATIME | CEPH_STATX_MTIME,
|
||||
AT_STATX_DONT_SYNC | AT_SYMLINK_NOFOLLOW);
|
||||
AT_SYMLINK_NOFOLLOW);
|
||||
if (r < 0) {
|
||||
derr << ": failed to stat snap=" << m_current.first << ": " << cpp_strerror(r)
|
||||
<< dendl;
|
||||
@ -2878,7 +2878,7 @@ int PeerReplayer::RemoteSync::get_entry(std::string *epath, struct ceph_statx *s
|
||||
r = ceph_statxat(m_local, m_fh->c_fd, _epath.c_str(), &cstx,
|
||||
CEPH_STATX_MODE | CEPH_STATX_UID | CEPH_STATX_GID |
|
||||
CEPH_STATX_SIZE | CEPH_STATX_ATIME | CEPH_STATX_MTIME,
|
||||
AT_STATX_DONT_SYNC | AT_SYMLINK_NOFOLLOW);
|
||||
AT_SYMLINK_NOFOLLOW);
|
||||
if (r < 0) {
|
||||
derr << ": failed to stat epath=" << _epath << ": " << cpp_strerror(r)
|
||||
<< dendl;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user