Subject: Re: [nfsv4] pNFS issue 9: last_write_offset

From: Garth Goodson <[email-masked]>
Date: Mon, 05 Jun 2006 15:00:58 -0700

Corbett, Peter wrote:
> Last_write_offset is confusing.  How about last_byte_written or just
> last_byte? 
> 
> -----Original Message-----
> From: Benny Halevy [mailto:[email-masked]] 
> Sent: Monday, June 05, 2006 1:35 AM
> To: Goodson, Garth
> Cc: [email-masked]
> Subject: Re: [nfsv4] pNFS issue 9: last_write_offset
> 
> Garth, the change looks good.  I'd consider deleting "Note: 
> " though...
> 
> Benny
>

I'm ok with changing last_write_offset to last_byte (any objections; do 
we need to compromise on last_byte_written?).

I'm also ok with dropping the "Note: ".

I'll wait a day or two and repost the text if there are no further 
suggestions.

-Garth

> Garth Goodson wrote:
>> Some text to make the changes described in issue 9.
>>
>> http://www.nfsv4-editor.org/cgi-bin/roundup/nfsv4/issue9
>>
>>
>> 14.4.2.  LAYOUTCOMMIT and size
>>
>>    The file's size may be updated at LAYOUTCOMMIT time as well.  The
>>    LAYOUTCOMMIT operation contains an argument ("last_write_offset")
>>    that indicates the highest byte offset written but not yet
>>    committed via LAYOUTCOMMIT.  Note: this argument is switched on a
>>    boolean value indicating whether or not a previous write occured.
> If
>>    the switch is false, no "last_write_offset" is given; a
>>    "last_write_offset" specifying an offset of 0 means byte 0 was the
>>    highest last byte written.
>>
>> ...
>>
>> 22.46.2.  ARGUMENT
>>
>>    union newoffset4 switch (bool newoffset) {
>>        case TRUE:
>>            offset4           offset;
>>        case FALSE:
>>            void;
>>    };
>>
>>    ...
>>
>>    struct LAYOUTCOMMIT4args {
>>        /* CURRENT_FH: file */
>>        clientid4               clientid;
>>        offset4                 offset;
>>        length4                 length;
>>        bool                    reclaim;
>>        newoffset4              last_write_offset;
>>        newtime4                time_modify;
>>        newtime4                time_access;
>>        pnfs_layoutupdate4      layoutupdate;
>>    };
>>
>> _______________________________________________
>> nfsv4 mailing list
>> [email-masked]
>> https://www1.ietf.org/mailman/listinfo/nfsv4
> 
> 
> 
> _______________________________________________
> nfsv4 mailing list
> [email-masked]
> https://www1.ietf.org/mailman/listinfo/nfsv4

_______________________________________________
nfsv4 mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/nfsv4

---

From: Benny Halevy <[email-masked]>
Date: Tue, 06 Jun 2006 07:14:02 +0300

Garth Goodson wrote:
>> From: Benny Halevy [mailto:[email-masked]] Sent: Monday, June 
>> 05, 2006 1:35 AM
>> To: Goodson, Garth
>> Cc: [email-masked]
>> Garth, the change looks good.  I'd consider deleting "Note: " though...
>>
>> Benny
>>
>
> I'm ok with changing last_write_offset to last_byte (any objections; 
> do we need to compromise on last_byte_written?).
FWIW, last_byte_written sounds better to me.
Benny

---

From: Brent Welch <[email-masked]>
Date: Tue, 06 Jun 2006 10:53:46 -0700

historically it was something like "last_byte", but that is
ambiguous - to some readers anyway.  We want something to
covey that it meant you did a write to the byte at offset 0,
thereby putting one byte into the file.

last_byte_written is fine with me.

>>>Garth Goodson said:

--
Brent Welch
Software Architect, Panasas Inc
Accelerating Time to Results(tm) with Clustered Storage

www.panasas.com
[email-masked]

---

From: Garth Goodson <[email-masked]>
Date: Tue, 06 Jun 2006 17:41:06 -0700

> last_byte_written is fine with me.

Ok, last_byte_written it is.  Here is an update to the text:

    The file's size may be updated at LAYOUTCOMMIT time as well.  The
    LAYOUTCOMMIT operation contains an argument ("last_byte_written")
    that indicates the highest byte offset written but not yet
    committed via LAYOUTCOMMIT.  This argument is switched on a
    boolean value indicating whether or not an uncommitted write
    occurred prior to the LAYOUTCOMMIT.  If the switch is false, no
    "last_byte_written" is given; a "last_byte_written" specifying an
    offset of 0 means byte 0 is the highest last byte offset written.

...

22.46.2.  ARGUMENT

    ...

    struct LAYOUTCOMMIT4args {
        /* CURRENT_FH: file */
        clientid4               clientid;
        offset4                 offset;
        length4                 length;
        bool                    reclaim;
        newoffset4              last_byte_written;
        newtime4                time_modify;
        newtime4                time_access;
        pnfs_layoutupdate4      layoutupdate;
    };

...

22.46.4

   The "last_byte_written" argument specifies the offset of the last byte
   written by the client prior to the LAYOUTCOMMIT. This argument's value
   is never equal to the file's size (at most it is one byte less than
   the file's size). The metadata server may use this information to
   determine whether the file's size needs to be updated. If the metadata
   server updates the file's size as the result of the LAYOUTCOMMIT
   operation, it must return the new size as part of the results.

...