ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ceph: remove dead code in ceph_sync_write
@ 2021-08-11 11:19 Jeff Layton
  2021-08-11 14:37 ` Luis Henriques
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Layton @ 2021-08-11 11:19 UTC (permalink / raw)
  To: ceph-devel; +Cc: idryomov

We've already checked these flags near the top of the function and
bailed out if either were set.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/ceph/file.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index d1755ac1d964..f55ca2c4c7de 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -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:
-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ceph: remove dead code in ceph_sync_write
  2021-08-11 11:19 [PATCH] ceph: remove dead code in ceph_sync_write Jeff Layton
@ 2021-08-11 14:37 ` Luis Henriques
  2021-08-11 14:44   ` Jeff Layton
  0 siblings, 1 reply; 4+ messages in thread
From: Luis Henriques @ 2021-08-11 14:37 UTC (permalink / raw)
  To: Jeff Layton; +Cc: ceph-devel, idryomov

Jeff Layton <jlayton@kernel.org> writes:

> 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,
-- 
Luis


>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
>  fs/ceph/file.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> index d1755ac1d964..f55ca2c4c7de 100644
> --- a/fs/ceph/file.c
> +++ b/fs/ceph/file.c
> @@ -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:
> -- 
>
> 2.31.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ceph: remove dead code in ceph_sync_write
  2021-08-11 14:37 ` Luis Henriques
@ 2021-08-11 14:44   ` Jeff Layton
  2021-08-11 16:12     ` Ilya Dryomov
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Layton @ 2021-08-11 14:44 UTC (permalink / raw)
  To: Luis Henriques; +Cc: ceph-devel, idryomov

On Wed, 2021-08-11 at 15:37 +0100, Luis Henriques wrote:
> Jeff Layton <jlayton@kernel.org> writes:
> 
> > 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,

Oof. You're totally right. Dropping this patch!

Thanks,
-- 
Jeff Layton <jlayton@kernel.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ceph: remove dead code in ceph_sync_write
  2021-08-11 14:44   ` Jeff Layton
@ 2021-08-11 16:12     ` Ilya Dryomov
  0 siblings, 0 replies; 4+ messages in thread
From: Ilya Dryomov @ 2021-08-11 16:12 UTC (permalink / raw)
  To: Jeff Layton; +Cc: Luis Henriques, Ceph Development

On Wed, Aug 11, 2021 at 4:44 PM Jeff Layton <jlayton@kernel.org> wrote:
>
> On Wed, 2021-08-11 at 15:37 +0100, Luis Henriques wrote:
> > Jeff Layton <jlayton@kernel.org> writes:
> >
> > > 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,
>
> Oof. You're totally right. Dropping this patch!

But it would have made https://github.com/ceph/ceph/pull/42749
unfounded! ;)

Thanks,

                Ilya

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-11 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 11:19 [PATCH] ceph: remove dead code in ceph_sync_write Jeff Layton
2021-08-11 14:37 ` Luis Henriques
2021-08-11 14:44   ` Jeff Layton
2021-08-11 16:12     ` Ilya Dryomov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).