public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Mkrtchyan, Tigran" <tigran.mkrtchyan@desy.de>
To: Dave Noveck <davenoveck@gmail.com>
Cc: Marc Eshel <eshel@us.ibm.com>,
	linux-nfs <linux-nfs@vger.kernel.org>,
	Ganesha-devel <devel@lists.nfs-ganesha.org>,
	NFSv4 <nfsv4@ietf.org>,
	linux-nfs-owner <linux-nfs-owner@vger.kernel.org>
Subject: Re: [nfsv4] file size and getattr
Date: Mon, 25 Feb 2019 09:49:37 +0100 (CET)	[thread overview]
Message-ID: <741516773.7109032.1551084577150.JavaMail.zimbra@desy.de> (raw)
In-Reply-To: <CADaq8jfT=nxmVPz4mDRFAaOx36uxWqKbxitqS-YH3GCOs4CsrQ@mail.gmail.com>



----- Original Message -----
> From: "Dave Noveck" <davenoveck@gmail.com>
> To: "Marc Eshel" <eshel@us.ibm.com>
> Cc: "linux-nfs" <linux-nfs@vger.kernel.org>, "Ganesha-devel" <devel@lists.nfs-ganesha.org>, "NFSv4" <nfsv4@ietf.org>,
> "linux-nfs-owner" <linux-nfs-owner@vger.kernel.org>
> Sent: Saturday, February 23, 2019 12:38:56 AM
> Subject: Re: [nfsv4] file size and getattr

>> Does the NFSv4 spec allows the server to return file size that doesn't
>> include the unstable write to the writer or any other NFS client?
> 
> I would say "no".   Consider the followiing sentence in the description of
> COMMIT.
> 

I would say "yes". Let's have a look at LAYOUTCOMMIT. Spec says:

"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
   (locr_newsize.ns_size) as part of the results."

I read this as: Metadata server may not know real file size until client sends
the file size information. Our DSes return DATA_SYNC and relay on client to
issue LAYOUTCOMMIT to update file size (well, on close we force data servers
up update file anyway).

Tigran. 


>> If the count is zero, a flush from the offset to the end of the file is
> done.
> 
> Note that he size returned by GETATTR gives you the end of the file so
> that, if it did not
> reflect the unstable writes, COMMIT wouldn't work right.
> 
> On Fri, Feb 22, 2019 at 6:25 PM Marc Eshel <eshel@us.ibm.com> wrote:
> 
>> What is the file size returned by the NFS server for getattr after an
>> unstable write to the NFS client that did the write or to other NFS
>> clients.
>>
>> As far as I know most file systems will always return the file size that
>> includes the unstable writes.
>>
>> Does the NFSv4 spec allows the server to return file size that doesn't
>> include the unstable write to the writer or any other NFS client?
>>
>> Marc.
>>
>>
> 
> _______________________________________________
> nfsv4 mailing list
> nfsv4@ietf.org
> https://www.ietf.org/mailman/listinfo/nfsv4

  parent reply	other threads:[~2019-02-25  8:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <155049372736.14318.3390584694682770373.idtracker@ietfa.amsl.com>
     [not found] ` <CADaq8je2Ap4oAZAPOguaWctUs8dQ=Q9g=TO39EOiJW5EJSFTGg@mail.gmail.com>
2019-02-22 23:25   ` file size and getattr Marc Eshel
     [not found]     ` <CADaq8jfT=nxmVPz4mDRFAaOx36uxWqKbxitqS-YH3GCOs4CsrQ@mail.gmail.com>
2019-02-25  8:49       ` Mkrtchyan, Tigran [this message]
2019-02-26  2:54         ` [nfsv4] " Rick Macklem
2019-02-26  3:23           ` Rick Macklem
2019-02-26 12:48             ` Trond Myklebust
2019-02-27  0:13               ` Rick Macklem
2019-02-27  1:12                 ` Trond Myklebust
     [not found]                   ` <CADaq8jfcFCuM5u30bXqTvg+0Hc-V+1VO9aUdSJLA090j48LCvA@mail.gmail.com>
2019-02-27 18:05                     ` Trond Myklebust
     [not found]         ` <CADaq8jdp7qVOE9aKui-tgrk00hVmNVXP=yjQ_G-RtGm+G4VrYw@mail.gmail.com>
2019-02-26 19:46           ` J. Bruce Fields

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=741516773.7109032.1551084577150.JavaMail.zimbra@desy.de \
    --to=tigran.mkrtchyan@desy.de \
    --cc=davenoveck@gmail.com \
    --cc=devel@lists.nfs-ganesha.org \
    --cc=eshel@us.ibm.com \
    --cc=linux-nfs-owner@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=nfsv4@ietf.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