Skip to content

Commit b178cf4

Browse files
ukernelidryomov
authored andcommitted
ceph: don't use CEPH_OSD_FLAG_ORDERSNAP
Inode can be moved between snap realms. It's possible inode is moved into a snap realm whose seq number is smaller than old snap realm's. So there is no guarantee that seq number inode's snap context always increases. Signed-off-by: "Yan, Zheng" <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 1c0a9c2 commit b178cf4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/ceph/file.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ static void ceph_aio_retry_work(struct work_struct *work)
787787
goto out;
788788
}
789789

790-
req->r_flags = CEPH_OSD_FLAG_ORDERSNAP | CEPH_OSD_FLAG_WRITE;
790+
req->r_flags = /* CEPH_OSD_FLAG_ORDERSNAP | */ CEPH_OSD_FLAG_WRITE;
791791
ceph_oloc_copy(&req->r_base_oloc, &orig_req->r_base_oloc);
792792
ceph_oid_copy(&req->r_base_oid, &orig_req->r_base_oid);
793793

@@ -860,7 +860,7 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter,
860860
if (ret2 < 0)
861861
dout("invalidate_inode_pages2_range returned %d\n", ret2);
862862

863-
flags = CEPH_OSD_FLAG_ORDERSNAP | CEPH_OSD_FLAG_WRITE;
863+
flags = /* CEPH_OSD_FLAG_ORDERSNAP | */ CEPH_OSD_FLAG_WRITE;
864864
} else {
865865
flags = CEPH_OSD_FLAG_READ;
866866
}
@@ -1063,7 +1063,7 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos,
10631063
if (ret < 0)
10641064
dout("invalidate_inode_pages2_range returned %d\n", ret);
10651065

1066-
flags = CEPH_OSD_FLAG_ORDERSNAP | CEPH_OSD_FLAG_WRITE;
1066+
flags = /* CEPH_OSD_FLAG_ORDERSNAP | */ CEPH_OSD_FLAG_WRITE;
10671067

10681068
while ((len = iov_iter_count(from)) > 0) {
10691069
size_t left;

0 commit comments

Comments
 (0)