Skip to contentSkip to conversation

Reference to file size in nfsd_create_v3

DISCUSSION Shehjar Tikoo 3 participants 6 messages Jun 26, 2009 – Aug 27, 2009 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 9 lines · Shehjar Tikoo

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.

#3 lore raw
Quoted 7 lines · J. Bruce Fields
Quoted 6 lines · Shehjar Tikoo

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!"

Quoted 6 lines
Quoted 1 line

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 14 lines · Shehjar Tikoo
Quoted 13 lines · J. Bruce Fields
Quoted 8 lines · Shehjar Tikoo

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.

Quoted 9 lines
Quoted 1 line

--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

#6 lore raw
Quoted 15 lines · Peter Staubach
Quoted 14 lines · Shehjar Tikoo
Quoted 13 lines · J. Bruce Fields
Quoted 8 lines · Shehjar Tikoo

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.

Quoted 8 lines
Quoted 8 lines
Quoted 1 line

--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?

Quoted 4 lines

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.

Quoted 10 lines

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
Quoted 18 lines · J. Bruce Fields
Quoted 17 lines · Peter Staubach
Quoted 16 lines · Shehjar Tikoo
Quoted 7 lines · J. Bruce Fields
Quoted 6 lines · Shehjar Tikoo

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!"

Quoted 6 lines
Quoted 2 lines

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.

Quoted 9 lines
Quoted 5 lines
Quoted 5 lines

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.

Quoted 7 lines
Quoted 3 lines

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

Quoted 11 lines

--b.

Quoted 9 lines

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html