From: Trond Myklebust <trondmy@primarydata.com>
To: hch <hch@lst.de>
Cc: "bfields@redhat.com" <bfields@redhat.com>,
"jlayton@poochiereds.net" <jlayton@poochiereds.net>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] nfsd: special case truncates some more
Date: Mon, 23 Jan 2017 17:42:16 +0000 [thread overview]
Message-ID: <1485193333.34422.5.camel@primarydata.com> (raw)
In-Reply-To: <20170123173817.GA22777@lst.de>
T24gTW9uLCAyMDE3LTAxLTIzIGF0IDE4OjM4ICswMTAwLCBoY2ggd3JvdGU6DQo+IE9uIE1vbiwg
SmFuIDIzLCAyMDE3IGF0IDA1OjI1OjM0UE0gKzAwMDAsIFRyb25kIE15a2xlYnVzdCB3cm90ZToN
Cj4gPiBJbiB0aGF0IGNhc2UgdGhlIGNsaWVudCB3aWxsIGJlIHJlcXVpcmVkIHRvIGNvbnRpbnVl
IHRvIG5lZWQgdG8NCj4gPiBzZW5kDQo+ID4gbXRpbWUvY3RpbWUgaW4gb3JkZXIgdG8gZW5zdXJl
IHRoYXQgd2UgZ2V0IHRoZSBzYW1lIGhpc3RvcmljYWwNCj4gPiBzZW1hbnRpY3Mgdy5yLnQuIGZ0
cnVuY2F0ZSgpIHZzIHRydW5jYXRlKCkuDQo+ID4gDQo+ID4gSU9XOiBJdCdzIG5vdCBhIHF1ZXN0
aW9uIG9mIHRoZSBjbGllbnQgYmVpbmcgbGF6eSBhYm91dCBjbGVhcmluZw0KPiA+IHRoZQ0KPiA+
IGZsYWdzLiBJdCdzIGEgcXVlc3Rpb24gb2YgZW5mb3JjaW5nIHRoZSBjb3JyZWN0IHNlbWFudGlj
cy4NCj4gDQo+IE5vLCB0aGUgTkZTIHNwZWMgcmVxdWlyZXMgdGhlIHNlcnZlciB0byBhZGQgYW4g
aW1wbGljaXQgbXRpbWUNCj4gd2hlbiB0aGUgc2l6ZSBhY3R1YWxseSBjaGFuZ2VzLsKgwqBJbiBm
YWN0IHRoZSBjdXJyZW50IGNvZGUgaGFzIGENCj4gY29tbWVudA0KPiBwb2ludGluZyB0byB0aGUg
c2VjdGlvbjoNCj4gDQo+IMKgKiBSRkM1NjYxLCBTZWN0aW9uIDE4LjMwLjQ6DQo+IMKgKsKgwqDC
oENoYW5naW5nIHRoZSBzaXplIG9mIGEgZmlsZSB3aXRoIFNFVEFUVFIgaW5kaXJlY3RseQ0KPiDC
oCrCoMKgwqBjaGFuZ2VzIHRoZSB0aW1lX21vZGlmeSBhbmQgY2hhbmdlIGF0dHJpYnV0ZXMuDQo+
IMKgKg0KPiDCoCogKGFuZCBzaW1pbGFyIGZvciB0aGUgb2xkZXIgUkZDcykNCj4gDQo+IEFuZCB5
ZXMsIEkndmUgZG91YmxlIGNoZWNrZWQgdGhhdCBpbiB0aGUgUkZDLg0KDQpTdXJlLCBidXQgdHJ1
bmNhdGUoKSBvbiBQT1NJWCBhZGRzIHRoZSByZXF1aXJlbWVudCB0aGF0IHRoZSBtdGltZS9jdGlt
ZQ0Kc2hvdWxkIGNoYW5nZSBldmVuIHdoZW4gdGhlIGZpbGUgc2l6ZSBpcyBub3QgY2hhbmdlZC4N
Cg0KLS0gDQpUcm9uZCBNeWtsZWJ1c3QNCkxpbnV4IE5GUyBjbGllbnQgbWFpbnRhaW5lciwgUHJp
bWFyeURhdGENCnRyb25kLm15a2xlYnVzdEBwcmltYXJ5ZGF0YS5jb20NCg==
WARNING: multiple messages have this Message-ID (diff)
From: Trond Myklebust <trondmy@primarydata.com>
To: hch <hch@lst.de>
Cc: "bfields@redhat.com" <bfields@redhat.com>,
"jlayton@poochiereds.net" <jlayton@poochiereds.net>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] nfsd: special case truncates some more
Date: Mon, 23 Jan 2017 17:42:16 +0000 [thread overview]
Message-ID: <1485193333.34422.5.camel@primarydata.com> (raw)
In-Reply-To: <20170123173817.GA22777@lst.de>
On Mon, 2017-01-23 at 18:38 +0100, hch wrote:
> On Mon, Jan 23, 2017 at 05:25:34PM +0000, Trond Myklebust wrote:
> > In that case the client will be required to continue to need to
> > send
> > mtime/ctime in order to ensure that we get the same historical
> > semantics w.r.t. ftruncate() vs truncate().
> >
> > IOW: It's not a question of the client being lazy about clearing
> > the
> > flags. It's a question of enforcing the correct semantics.
>
> No, the NFS spec requires the server to add an implicit mtime
> when the size actually changes. In fact the current code has a
> comment
> pointing to the section:
>
> * RFC5661, Section 18.30.4:
> * Changing the size of a file with SETATTR indirectly
> * changes the time_modify and change attributes.
> *
> * (and similar for the older RFCs)
>
> And yes, I've double checked that in the RFC.
Sure, but truncate() on POSIX adds the requirement that the mtime/ctime
should change even when the file size is not changed.
--
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@primarydata.com
next prev parent reply other threads:[~2017-01-23 17:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-22 16:54 setattr ATTR_SIZE vs the rest Christoph Hellwig
2017-01-22 16:54 ` [PATCH] nfsd: special case truncates some more Christoph Hellwig
2017-01-23 12:21 ` Jeff Layton
2017-01-23 12:33 ` Christoph Hellwig
2017-01-23 15:36 ` Christoph Hellwig
2017-01-23 15:36 ` Christoph Hellwig
2017-01-23 15:52 ` Jeff Layton
2017-01-23 16:05 ` Christoph Hellwig
2017-01-23 16:14 ` Jeff Layton
2017-01-23 16:20 ` Trond Myklebust
2017-01-23 16:20 ` Trond Myklebust
2017-01-23 16:26 ` hch
2017-01-23 17:25 ` Trond Myklebust
2017-01-23 17:25 ` Trond Myklebust
2017-01-23 17:38 ` hch
2017-01-23 17:42 ` Trond Myklebust [this message]
2017-01-23 17:42 ` Trond Myklebust
2017-01-24 16:25 ` J. Bruce Fields
2017-01-24 22:02 ` J. Bruce Fields
2017-01-23 16:58 ` setattr ATTR_SIZE vs the rest J. Bruce Fields
2017-01-24 7:52 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2017-02-20 6:21 split setattr operations take 2 Christoph Hellwig
2017-02-20 6:21 ` [PATCH] nfsd: special case truncates some more Christoph Hellwig
2017-02-20 22:23 ` J. Bruce Fields
2017-02-21 15:07 ` Chuck Lever
2017-02-21 15:14 ` 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=1485193333.34422.5.camel@primarydata.com \
--to=trondmy@primarydata.com \
--cc=bfields@redhat.com \
--cc=hch@lst.de \
--cc=jlayton@poochiereds.net \
--cc=linux-fsdevel@vger.kernel.org \
--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 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.