Re: [PATCH 18/22] pnfs-submit: roc add layoutreturn op to close compound

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2010-11-12 18:56, Fred Isaman wrote:
> On Fri, Nov 12, 2010 at 11:31 AM, Benny Halevy <bhalevy@xxxxxxxxxxx> wrote:
>> On 2010-11-12 10:48, Fred Isaman wrote:
>>> From: Andy Adamson <andros@xxxxxxxxxx>
>>> @@ -2143,6 +2145,8 @@ static int nfs4_xdr_enc_close(struct rpc_rqst *req, __be32 *p, struct nfs_closea
>>>       encode_putfh(&xdr, args->fh, &hdr);
>>>       encode_close(&xdr, args, &hdr);
>>>       encode_getfattr(&xdr, args->bitmask, &hdr);
>>> +     if (args->op_bitmask & NFS4_HAS_LAYOUTRETURN) /* layoutreturn set */
>>> +             encode_layoutreturn(&xdr, &args->lr_args, &hdr);
>>
>> Sorry, I just noticed, but if there's no object I'll move the layoutreturn op
>> before close in the compound.
>>
>> Benny
>>
> 
> The reason the LAYOUTRETURN was last was so that we could ignore any
> error on the return.  Otherwise an error on the LAYOUTRETURN stops the
> CLOSE from being processed.  I'll defer to Andy, but while I see why
> you would want the reutrn first, moving it will require paying careful
> attention to how an error is dealt with.  (Actually, we have the same
> issue with the LAYOUTCOMMIT when it is later added.)

That's true, but the whole point behind doing the layoutreturn on close
is doing it before CLOSE :)

As we say in section 18.43:
   The logr_return_on_close result field is a directive to return the
   layout before closing the file.
          ^^^^^^^^^^^^^^^^^^^^^^^^

Benny

> 
> Fred
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux