ceph: remove dead code in ceph_sync_write
PATCH 1/1 ceph: remove dead code in ceph_sync_write
We've already checked these flags near the top of the function and bailed out if either were set.
--- fs/ceph/file.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
fs/ceph/file.c +1 -5
@@ -1834,12 +1834,8 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from) goto retry_snap; } -if (written >=0 ) { -if ((map_flags &CEPH_OSDMAP_NEARFULL ) || - (pool_flags &CEPH_POOL_FLAG_NEARFULL )) - iocb->ki_flags |=IOCB_DSYNC ; +if (written >=0 ) written =generic_write_sync (iocb, written); - } goto out_unlocked; out:
Signature · 1 line
2.31.1
Quoted 2 lines · Jeff Layton
We've already checked these flags near the top of the function and bailed out if either were set.
The flags being checked at the top of the function are CEPH_OSDMAP_FULL and CEPH_POOL_FLAG_FULL; here we're checking the *_NEARFULL flags. Right? (I had to look a few times to make sure my eyes were not lying.)
Cheers,
Signature · 1 line
Luis
Quoted 28 lines
Signed-off-by Jeff Layton <[email protected]>--- fs/ceph/file.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)fs/ceph/file.c +1
-5@@ -1834,12 +1834,8 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from) goto retry_snap; } -if (written >=0 ) { -if ((map_flags &CEPH_OSDMAP_NEARFULL ) || - (pool_flags &CEPH_POOL_FLAG_NEARFULL )) - iocb->ki_flags |=IOCB_DSYNC ; +if (written >=0 ) written =generic_write_sync (iocb, written); - } goto out_unlocked; out:Signature · 1 line
2.31.1
Quoted 10 lines · Luis Henriques
Quoted 2 lines · Jeff Layton
We've already checked these flags near the top of the function and bailed out if either were set.
The flags being checked at the top of the function are
CEPH_OSDMAP_FULLandCEPH_POOL_FLAG_FULL; here we're checking the*_NEARFULLflags. Right? (I had to look a few times to make sure my eyes were not lying.)Cheers,
Oof. You're totally right. Dropping this patch!
Thanks,
Signature · 1 line
Jeff Layton <[email protected]>
Ilya Dryomov
maintainerQuoted 7 lines · Jeff Layton
Quoted 5 lines · Luis Henriques
Quoted 2 lines · Jeff Layton
We've already checked these flags near the top of the function and bailed out if either were set.
Quoted 7 lines
Quoted 5 lines
The flags being checked at the top of the function are
CEPH_OSDMAP_FULLandCEPH_POOL_FLAG_FULL; here we're checking the*_NEARFULLflags. Right? (I had to look a few times to make sure my eyes were not lying.)Cheers,
Oof. You're totally right. Dropping this patch!
But it would have made https://github.com/ceph/ceph/pull/42749
unfounded! ;)
Thanks,
Ilya