linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fred Isaman <iisaman@netapp.com>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: Benny Halevy <bhalevy@panasas.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 20/22] pnfs-submit: wave2: remove all LAYOUTRETURN code
Date: Thu, 16 Dec 2010 09:04:22 -0500	[thread overview]
Message-ID: <AANLkTi=G8x9M9QmKRY3wzLPD-49O9VwxFZ8sUCEPDiHk@mail.gmail.com> (raw)
In-Reply-To: <4D0A0A6D.5060807@panasas.com>

On Thu, Dec 16, 2010 at 7:47 AM, Boaz Harrosh <bharrosh@panasas.com> wr=
ote:
> On 12/10/2010 03:22 AM, Fred Isaman wrote:
>
>> --- a/fs/nfs/pnfs.c
>> +++ b/fs/nfs/pnfs.c
>> @@ -599,55 +599,6 @@ void nfs4_asynch_forget_layouts(struct pnfs_lay=
out_hdr *lo,
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
>> =A0}
>>
>> -/* Return true if there is layout based io in progress in the given=
 range.
>> - * Assumes range has already been marked invalid, and layout marked=
 to
>> - * prevent any new lseg from being inserted.
>> - */
>> -bool
>> -pnfs_return_layout_barrier(struct nfs_inode *nfsi,
>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct pnfs_layout_=
range *range)
>> -{
>> - =A0 =A0 struct pnfs_layout_segment *lseg;
>> - =A0 =A0 bool ret =3D false;
>> -
>> - =A0 =A0 spin_lock(&nfsi->vfs_inode.i_lock);
>> - =A0 =A0 list_for_each_entry(lseg, &nfsi->layout->segs, fi_list)
>> - =A0 =A0 =A0 =A0 =A0 =A0 if (should_free_lseg(&lseg->range, range))=
 {
>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ret =3D true;
>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break;
>> - =A0 =A0 =A0 =A0 =A0 =A0 }
>> - =A0 =A0 spin_unlock(&nfsi->vfs_inode.i_lock);
>> - =A0 =A0 dprintk("%s:Return %d\n", __func__, ret);
>> - =A0 =A0 return ret;
>> -}
>> -
>> -static int
>> -return_layout(struct inode *ino, struct pnfs_layout_range *range, b=
ool wait)
>> -{
>> - =A0 =A0 struct nfs4_layoutreturn *lrp;
>> - =A0 =A0 struct nfs_server *server =3D NFS_SERVER(ino);
>> - =A0 =A0 int status =3D -ENOMEM;
>> -
>> - =A0 =A0 dprintk("--> %s\n", __func__);
>> -
>> - =A0 =A0 lrp =3D kzalloc(sizeof(*lrp), GFP_KERNEL);
>> - =A0 =A0 if (lrp =3D=3D NULL) {
>> - =A0 =A0 =A0 =A0 =A0 =A0 put_layout_hdr(ino);
>> - =A0 =A0 =A0 =A0 =A0 =A0 goto out;
>> - =A0 =A0 }
>> - =A0 =A0 lrp->args.reclaim =3D 0;
>> - =A0 =A0 lrp->args.layout_type =3D server->pnfs_curr_ld->id;
>> - =A0 =A0 lrp->args.return_type =3D RETURN_FILE;
>> - =A0 =A0 lrp->args.range =3D *range;
>> - =A0 =A0 lrp->args.inode =3D ino;
>> - =A0 =A0 lrp->clp =3D server->nfs_client;
>> -
>> - =A0 =A0 status =3D nfs4_proc_layoutreturn(lrp, wait);
>> -out:
>> - =A0 =A0 dprintk("<-- %s status: %d\n", __func__, status);
>> - =A0 =A0 return status;
>> -}
>> -
>> =A0/* Initiates a LAYOUTRETURN(FILE) */
>> =A0int
>> =A0_pnfs_return_layout(struct inode *ino, struct pnfs_layout_range *=
range,
>> @@ -673,21 +624,10 @@ _pnfs_return_layout(struct inode *ino, struct =
pnfs_layout_range *range,
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto out;
>> =A0 =A0 =A0 }
>> =A0 =A0 =A0 lo->plh_block_lgets++;
>> - =A0 =A0 /* Reference matched in nfs4_layoutreturn_release */
>> - =A0 =A0 get_layout_hdr(lo);
>> =A0 =A0 =A0 spin_unlock(&ino->i_lock);
>> =A0 =A0 =A0 pnfs_free_lseg_list(&tmp_list);
>>
>> - =A0 =A0 if (layoutcommit_needed(nfsi)) {
>> - =A0 =A0 =A0 =A0 =A0 =A0 status =3D pnfs_layoutcommit_inode(ino, wa=
it);
>> - =A0 =A0 =A0 =A0 =A0 =A0 if (status) {
>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Return layout even if l=
ayoutcommit fails */
>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dprintk("%s: layoutcommit =
failed, status=3D%d. "
>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "Returning=
 layout anyway\n",
>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 __func__, =
status);
>> - =A0 =A0 =A0 =A0 =A0 =A0 }
>> - =A0 =A0 }
>> - =A0 =A0 status =3D return_layout(ino, &arg, wait);
>
>
> You are also removing the layoutcommit.
> 1. You have not stated it anywhere, and snacked it in silently
> 2. If you are removing layoutcommit please do that in a different
> =A0 patch with it's own comment and explanation.
> 3. How come? forgetful or not layoutcommits are a different issue
> =A0 and must be done correctly when writing !!!?!
>
> Boaz

You are right, that should have been a separate patch.

=46red

>> + =A0 =A0 /* Don't need to wait since this is followed by call to en=
d_writeback */
>> =A0out:
>> =A0 =A0 =A0 dprintk("<-- %s status: %d\n", __func__, status);
>> =A0 =A0 =A0 return status;
>> diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
>> index d999e38..0ddab0d 100644
>> --- a/fs/nfs/pnfs.h
>> +++ b/fs/nfs/pnfs.h
>> @@ -183,7 +183,6 @@ extern int nfs4_proc_getdeviceinfo(struct nfs_se=
rver *server,
>> =A0extern int nfs4_proc_layoutget(struct nfs4_layoutget *lgp);
>> =A0extern int nfs4_proc_layoutcommit(struct nfs4_layoutcommit_data *=
data,
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0i=
nt issync);
>> -extern int nfs4_proc_layoutreturn(struct nfs4_layoutreturn *lrp, bo=
ol wait);
>>
>> =A0/* pnfs.c */
>> =A0void get_layout_hdr(struct pnfs_layout_hdr *lo);
>> @@ -193,7 +192,6 @@ bool should_free_lseg(struct pnfs_layout_range *=
lseg_range,
>> =A0struct pnfs_layout_segment *
>> =A0pnfs_update_layout(struct inode *ino, struct nfs_open_context *ct=
x,
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0enum pnfs_iomode access_type);
>> -bool pnfs_return_layout_barrier(struct nfs_inode *, struct pnfs_lay=
out_range *);
>> =A0int _pnfs_return_layout(struct inode *, struct pnfs_layout_range =
*, bool wait);
>> =A0void set_pnfs_layoutdriver(struct nfs_server *, u32 id);
>> =A0void unset_pnfs_layoutdriver(struct nfs_server *);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2010-12-16 14:04 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-10  1:22 [PATCH 00/22] pnfs more wave2 patches Fred Isaman
2010-12-10  1:22 ` [PATCH 01/22] Revert "pnfs-submit: handle NFS4ERR_DELEG_REVOKED for LAYOUTRETURN" Fred Isaman
2010-12-10  1:22 ` [PATCH 02/22] Revert "SQUASHME: pnfs-submit: encode layoutreturn on close before close" Fred Isaman
2010-12-10  1:22 ` [PATCH 03/22] Revert "SQUASHME: make roc patches compile without v4.1" Fred Isaman
2010-12-10  1:22 ` [PATCH 04/22] Revert "pnfs_submit: roc add layoutcommit op to close compound" Fred Isaman
2010-12-10  1:22 ` [PATCH 05/22] Revert "pnfs-submit refactor pnfs_layoutcommit_setup" Fred Isaman
2010-12-10  1:22 ` [PATCH 06/22] Revert "pnfs-submit refactor layoutcommit xdr structures" Fred Isaman
2010-12-10  1:22 ` [PATCH 07/22] Revert "pnfs-submit: roc add layoutreturn op to close compound" Fred Isaman
2010-12-10  1:22 ` [PATCH 08/22] Revert "FIXME: NFS: clear fsinfo before sendign rpc" Fred Isaman
2010-12-10  1:22 ` [PATCH 09/22] SQUASHME onto "pnfs_submit: cb_layoutrecall": revert pointless reordering Fred Isaman
2010-12-10  1:22 ` [PATCH 10/22] pnfs-submit: wave4: fix bug dealing with commit split between DS and MDS Fred Isaman
2010-12-10  1:22 ` [PATCH 11/22] pnfs-submit: wave2: NFS4ERR_RESOURCE is not a valid error for CB_LAYOUTRECALL Fred Isaman
2010-12-10  1:22 ` [PATCH 12/22] pnfs-submit: wave2: rewrite validate_bitmap_values to obey spec Fred Isaman
2010-12-15 13:57   ` Benny Halevy
2010-12-15 14:11     ` Fred Isaman
2010-12-15 15:29       ` Benny Halevy
2010-12-15 15:43         ` Fred Isaman
2010-12-15 15:56           ` Benny Halevy
2010-12-15 15:59             ` Fred Isaman
2010-12-15 16:48               ` Benny Halevy
2010-12-10  1:22 ` [PATCH 13/22] pnfs-submit: wave2: check that partial LAYOUTGET return is ignored Fred Isaman
2010-12-10  1:22 ` [PATCH 14/22] pnfs-submit: wave2: Don't wait in layoutget Fred Isaman
2010-12-10  1:22 ` [PATCH 15/22] pnfs-submit: wave2: Pull out all recall initiated LAYOUTRETURNS Fred Isaman
2010-12-10  1:22 ` [PATCH 16/22] pnfs-submit: wave2: remove cl_layoutrecalls list Fred Isaman
2010-12-10  1:22 ` [PATCH 17/22] pnfs-submit: wave2: change plh_outstanding to atomic_t Fred Isaman
2010-12-10  1:22 ` [PATCH 18/22] pnfs-submit: wave2: change lseg->valid from bool to a bit flag Fred Isaman
2010-12-10  1:22 ` [PATCH 19/22] pnfs-submit: wave2: Remove LAYOUTRETURN from return on close Fred Isaman
2010-12-10  1:22 ` [PATCH 20/22] pnfs-submit: wave2: remove all LAYOUTRETURN code Fred Isaman
2010-12-16 12:47   ` Boaz Harrosh
2010-12-16 14:04     ` Fred Isaman [this message]
2010-12-10  1:22 ` [PATCH 21/22] SQUASHME: pnfs: filelayout: call print_ds under ifdebug(FACILITY) Fred Isaman
2010-12-10  1:22 ` [PATCH 22/22] pnfs-submit: Turn off layoutcommits Fred Isaman
2010-12-16 12:47   ` Boaz Harrosh
2010-12-16 14:13     ` Fred Isaman
2010-12-16 14:49       ` Boaz Harrosh

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='AANLkTi=G8x9M9QmKRY3wzLPD-49O9VwxFZ8sUCEPDiHk@mail.gmail.com' \
    --to=iisaman@netapp.com \
    --cc=bhalevy@panasas.com \
    --cc=bharrosh@panasas.com \
    --cc=linux-nfs@vger.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 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).