* Reference to file size in nfsd_create_v3
@ 2009-06-26 9:10 Shehjar Tikoo
[not found] ` <4A449074.6060600-+FkPdpiNhgJBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Shehjar Tikoo @ 2009-06-26 9:10 UTC (permalink / raw)
To: Linux NFS Mailing List
Hi All
I am looking at the fs/nfsd/vfs.c:nfsd_create_v3 function.
In there, a comment says:
"furthermore, if the size is nonzero, we should ignore it
according to spec!"
Could someone please point out the section in RFC1813 where this
particular point is specified?
Thanks
Shehjar
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <4A449074.6060600-+FkPdpiNhgJBDgjK7y7TUQ@public.gmane.org>]
* Re: Reference to file size in nfsd_create_v3 [not found] ` <4A449074.6060600-+FkPdpiNhgJBDgjK7y7TUQ@public.gmane.org> @ 2009-08-25 16:18 ` J. Bruce Fields 2009-08-26 7:10 ` Shehjar Tikoo 0 siblings, 1 reply; 6+ messages in thread From: J. Bruce Fields @ 2009-08-25 16:18 UTC (permalink / raw) To: Shehjar Tikoo; +Cc: Linux NFS Mailing List On Fri, Jun 26, 2009 at 02:40:12PM +0530, Shehjar Tikoo wrote: > Hi All > > I am looking at the fs/nfsd/vfs.c:nfsd_create_v3 function. > In there, a comment says: > "furthermore, if the size is nonzero, we should ignore it > according to spec!" > > Could someone please point out the section in RFC1813 where this > particular point is specified? It's referring to the third paragraph of the DESCRIPTION section of the OPEN operation (14.2.16) in rfc 3530. --b. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Reference to file size in nfsd_create_v3 2009-08-25 16:18 ` J. Bruce Fields @ 2009-08-26 7:10 ` Shehjar Tikoo [not found] ` <4A94DFDA.4040508-+FkPdpiNhgJBDgjK7y7TUQ@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Shehjar Tikoo @ 2009-08-26 7:10 UTC (permalink / raw) To: J. Bruce Fields; +Cc: Linux NFS Mailing List J. Bruce Fields wrote: > On Fri, Jun 26, 2009 at 02:40:12PM +0530, Shehjar Tikoo wrote: >> Hi All >> >> I am looking at the fs/nfsd/vfs.c:nfsd_create_v3 function. In >> there, a comment says: "furthermore, if the size is nonzero, we >> should ignore it according to spec!" >> >> Could someone please point out the section in RFC1813 where this >> particular point is specified? > > It's referring to the third paragraph of the DESCRIPTION section of > the OPEN operation (14.2.16) in rfc 3530. > > --b. Ok. For NFSv3, is there a specified way to handle create or mkdir ops where the size is non-zero? The reason this came up is that I was testing unfs3 with SpecSFS2k8 and an MKDIR op failed in unfs3 because SFS sent the mkdir call with non-zero size in the attributes. I just wanted to see how Linux nfsd handled it. Thanks -Shehjar ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <4A94DFDA.4040508-+FkPdpiNhgJBDgjK7y7TUQ@public.gmane.org>]
* Re: Reference to file size in nfsd_create_v3 [not found] ` <4A94DFDA.4040508-+FkPdpiNhgJBDgjK7y7TUQ@public.gmane.org> @ 2009-08-26 13:38 ` Peter Staubach 2009-08-26 16:04 ` J. Bruce Fields 0 siblings, 1 reply; 6+ messages in thread From: Peter Staubach @ 2009-08-26 13:38 UTC (permalink / raw) To: Shehjar Tikoo; +Cc: J. Bruce Fields, Linux NFS Mailing List Shehjar Tikoo wrote: > J. Bruce Fields wrote: >> On Fri, Jun 26, 2009 at 02:40:12PM +0530, Shehjar Tikoo wrote: >>> Hi All >>> >>> I am looking at the fs/nfsd/vfs.c:nfsd_create_v3 function. In >>> there, a comment says: "furthermore, if the size is nonzero, we >>> should ignore it according to spec!" >>> >>> Could someone please point out the section in RFC1813 where this >>> particular point is specified? >> >> It's referring to the third paragraph of the DESCRIPTION section of >> the OPEN operation (14.2.16) in rfc 3530. >> >> --b. > Ok. > > For NFSv3, is there a specified way to handle create or mkdir ops where > the size is non-zero? The reason this came up is that I was testing > unfs3 with SpecSFS2k8 and an MKDIR op failed in unfs3 because SFS sent > the mkdir call with non-zero size in the attributes. I just wanted to > see how Linux nfsd handled it. > Most servers in the market just ignore the size field for MKDIR requests. They also ignore the size field, unless it is 0, for CREATE requests. Setting the size on a directory does not make sense and the usual decision point for file creation is whether to truncate the file to empty or not. ps ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Reference to file size in nfsd_create_v3 2009-08-26 13:38 ` Peter Staubach @ 2009-08-26 16:04 ` J. Bruce Fields 2009-08-27 6:19 ` Shehjar Tikoo 0 siblings, 1 reply; 6+ messages in thread From: J. Bruce Fields @ 2009-08-26 16:04 UTC (permalink / raw) To: Peter Staubach; +Cc: Shehjar Tikoo, Linux NFS Mailing List On Wed, Aug 26, 2009 at 09:38:46AM -0400, Peter Staubach wrote: > Shehjar Tikoo wrote: > > J. Bruce Fields wrote: > >> On Fri, Jun 26, 2009 at 02:40:12PM +0530, Shehjar Tikoo wrote: > >>> Hi All > >>> > >>> I am looking at the fs/nfsd/vfs.c:nfsd_create_v3 function. In > >>> there, a comment says: "furthermore, if the size is nonzero, we > >>> should ignore it according to spec!" > >>> > >>> Could someone please point out the section in RFC1813 where this > >>> particular point is specified? > >> > >> It's referring to the third paragraph of the DESCRIPTION section of > >> the OPEN operation (14.2.16) in rfc 3530. > >> > >> --b. > > Ok. > > > > For NFSv3, is there a specified way to handle create or mkdir ops where > > the size is non-zero? The reason this came up is that I was testing > > unfs3 with SpecSFS2k8 and an MKDIR op failed in unfs3 because SFS sent > > the mkdir call with non-zero size in the attributes. I just wanted to > > see how Linux nfsd handled it. But you've only seen the problem against unfs3, not against the kernel nfsd? > > Most servers in the market just ignore the size field for > MKDIR requests. They also ignore the size field, unless it is > 0, for CREATE requests. So it's probably a bug on both sides. (SpecSFS shouldn't be sending a non-zero size either.) --b. > > Setting the size on a directory does not make sense and the > usual decision point for file creation is whether to truncate > the file to empty or not. > > ps > -- > 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 http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Reference to file size in nfsd_create_v3 2009-08-26 16:04 ` J. Bruce Fields @ 2009-08-27 6:19 ` Shehjar Tikoo 0 siblings, 0 replies; 6+ messages in thread From: Shehjar Tikoo @ 2009-08-27 6:19 UTC (permalink / raw) To: J. Bruce Fields; +Cc: Peter Staubach, Linux NFS Mailing List J. Bruce Fields wrote: > On Wed, Aug 26, 2009 at 09:38:46AM -0400, Peter Staubach wrote: >> Shehjar Tikoo wrote: >>> J. Bruce Fields wrote: >>>> On Fri, Jun 26, 2009 at 02:40:12PM +0530, Shehjar Tikoo wrote: >>>>> Hi All >>>>> >>>>> I am looking at the fs/nfsd/vfs.c:nfsd_create_v3 function. In >>>>> there, a comment says: "furthermore, if the size is nonzero, we >>>>> should ignore it according to spec!" >>>>> >>>>> Could someone please point out the section in RFC1813 where this >>>>> particular point is specified? >>>> It's referring to the third paragraph of the DESCRIPTION section of >>>> the OPEN operation (14.2.16) in rfc 3530. >>>> >>>> --b. >>> Ok. >>> >>> For NFSv3, is there a specified way to handle create or mkdir ops where >>> the size is non-zero? The reason this came up is that I was testing >>> unfs3 with SpecSFS2k8 and an MKDIR op failed in unfs3 because SFS sent >>> the mkdir call with non-zero size in the attributes. I just wanted to >>> see how Linux nfsd handled it. > > But you've only seen the problem against unfs3, not against the kernel > nfsd? > I didnt test SFS against the kernel nfsd so cant comment on it. >> Most servers in the market just ignore the size field for >> MKDIR requests. They also ignore the size field, unless it is >> 0, for CREATE requests. > > So it's probably a bug on both sides. (SpecSFS shouldn't be sending a > non-zero size either.) > Yes, I fixed the problem in unfs3 by making it ignore the size in the MKDIR request. SpecSFS might need further investigation. Thanks -Shehjar > --b. > >> Setting the size on a directory does not make sense and the >> usual decision point for file creation is whether to truncate >> the file to empty or not. >> >> ps >> -- >> 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 http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-08-27 6:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-26 9:10 Reference to file size in nfsd_create_v3 Shehjar Tikoo
[not found] ` <4A449074.6060600-+FkPdpiNhgJBDgjK7y7TUQ@public.gmane.org>
2009-08-25 16:18 ` J. Bruce Fields
2009-08-26 7:10 ` Shehjar Tikoo
[not found] ` <4A94DFDA.4040508-+FkPdpiNhgJBDgjK7y7TUQ@public.gmane.org>
2009-08-26 13:38 ` Peter Staubach
2009-08-26 16:04 ` J. Bruce Fields
2009-08-27 6:19 ` Shehjar Tikoo
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).