All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: lustre-devel@lists.lustre.org
Subject: [lustre-devel] [PATCH 8/9] lustre: statahead: skip agl for the file in restoring
Date: Mon, 26 Nov 2018 02:09:40 +0000 (GMT)	[thread overview]
Message-ID: <alpine.LFD.2.21.1811260209230.32255@casper.infradead.org> (raw)
In-Reply-To: <154295732808.2850.16445000176556176904.stgit@noble>


> From: Fan Yong <fan.yong@intel.com>
> 
> In case of restore, the MDT has the right size and has already sent
> it back without granting the layout lock, inode is up-to-date. Then
> AGL (async glimpse lock) is useless.
> 
> Also to glimpse we need the layout, in case of a running restore the
> MDT holds the layout lock so the glimpse will block up to the end of
> restore (statahead/agl will block).

Reviewed-by: James Simmons <jsimmons@infradead.org>
 
> Signed-off-by: Fan Yong <fan.yong@intel.com>
> WC-bug-id: https://jira.whamcloud.com/browse/LU-9319
> Reviewed-by: Lai Siyao <lai.siyao@intel.com>
> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
> Reviewed-by: John L. Hammond <john.hammond@intel.com>
> Reviewed-on: https://review.whamcloud.com/26501
> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
> Signed-off-by: NeilBrown <neilb@suse.com>
> ---
>  drivers/staging/lustre/lustre/llite/statahead.c |   13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c
> index 28e85bfb9b82..3d71322aa1c7 100644
> --- a/drivers/staging/lustre/lustre/llite/statahead.c
> +++ b/drivers/staging/lustre/lustre/llite/statahead.c
> @@ -504,6 +504,19 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai)
>  		return;
>  	}
>  
> +	/* In case of restore, the MDT has the right size and has already
> +	 * sent it back without granting the layout lock, inode is up-to-date.
> +	 * Then AGL (async glimpse lock) is useless.
> +	 * Also to glimpse we need the layout, in case of a runninh restore
> +	 * the MDT holds the layout lock so the glimpse will block up to the
> +	 * end of restore (statahead/agl will block)
> +	 */
> +	if (test_bit(LLIF_FILE_RESTORING, &lli->lli_flags)) {
> +		lli->lli_agl_index = 0;
> +		iput(inode);
> +		return;
> +	}
> +
>  	/* Someone is in glimpse (sync or async), do nothing. */
>  	rc = down_write_trylock(&lli->lli_glimpse_sem);
>  	if (rc == 0) {
> 
> 
> 

  reply	other threads:[~2018-11-26  2:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-23  7:15 [lustre-devel] [PATCH 0/9] Assorted lustre patches - mostly from OpenSFS NeilBrown
2018-11-23  7:15 ` [lustre-devel] [PATCH 2/9] lustre: remove EIOCBRETRY handling NeilBrown
2018-11-26  1:30   ` James Simmons
2018-11-23  7:15 ` [lustre-devel] [PATCH 1/9] lustre: obdclass: fix formating of connection flags NeilBrown
2018-11-26  1:30   ` James Simmons
2018-11-23  7:15 ` [lustre-devel] [PATCH 3/9] lustre: ptlrpc: use smp unsafe at_init only for initialization NeilBrown
2018-11-26  1:32   ` James Simmons
2018-11-23  7:15 ` [lustre-devel] [PATCH 4/9] lustre: rename: DNE2 should return -EXDEV upon remote rename NeilBrown
2018-11-26  1:31   ` James Simmons
2018-11-26  3:00     ` NeilBrown
2018-11-23  7:15 ` [lustre-devel] [PATCH 9/9] lustre: statahead: add smp_mb() to serialize ops NeilBrown
2018-11-26  2:10   ` James Simmons
2018-11-23  7:15 ` [lustre-devel] [PATCH 8/9] lustre: statahead: skip agl for the file in restoring NeilBrown
2018-11-26  2:09   ` James Simmons [this message]
2018-11-26  2:09   ` James Simmons
2018-11-23  7:15 ` [lustre-devel] [PATCH 5/9] lustre: llite: clear LLIF_FILE_RESTORING when done NeilBrown
2018-11-26  1:34   ` James Simmons
2018-11-23  7:15 ` [lustre-devel] [PATCH 6/9] lustre: obdclass: health_check to report unhealthy upon LBUG NeilBrown
2018-11-26  1:46   ` James Simmons
2018-11-26  1:46   ` James Simmons
2018-11-27  2:32     ` NeilBrown
2018-11-23  7:15 ` [lustre-devel] [PATCH 7/9] lustre: lnet: Stop MLX5 triggering a dump_cqe NeilBrown
2018-11-26  1:49   ` James Simmons
2018-11-27  2:21     ` NeilBrown
2018-11-26  3:47 ` [lustre-devel] [PATCH 0/9] Assorted lustre patches - mostly from OpenSFS James Simmons

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=alpine.LFD.2.21.1811260209230.32255@casper.infradead.org \
    --to=jsimmons@infradead.org \
    --cc=lustre-devel@lists.lustre.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.