All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <lhenriques@suse.de>
To: Jeff Layton <jlayton@kernel.org>
Cc: ceph-devel@vger.kernel.org, idryomov@gmail.com
Subject: Re: [PATCH] ceph: remove dead code in ceph_sync_write
Date: Wed, 11 Aug 2021 15:37:04 +0100	[thread overview]
Message-ID: <87o8a4qc8f.fsf@suse.de> (raw)
In-Reply-To: <20210811111927.8417-1-jlayton@kernel.org> (Jeff Layton's message of "Wed, 11 Aug 2021 07:19:27 -0400")

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
>

  reply	other threads:[~2021-08-11 14:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 11:19 [PATCH] ceph: remove dead code in ceph_sync_write Jeff Layton
2021-08-11 14:37 ` Luis Henriques [this message]
2021-08-11 14:44   ` Jeff Layton
2021-08-11 16:12     ` Ilya Dryomov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8a4qc8f.fsf@suse.de \
    --to=lhenriques@suse.de \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.