Re: [PATCH] Server should allow offset larger than LLONG_MAX at commit procedure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




J. Bruce Fields 写道:
> On Thu, Aug 19, 2010 at 11:38:33AM +0800, Bian Naimeng wrote:
>>
>> J. Bruce Fields 写道:
>>> On Wed, Aug 18, 2010 at 04:09:28PM +0800, Bian Naimeng wrote:
>>>> When offset larger than LLONG_MAX, it's better to sync all the data of file
>>>> than return nfserr_inval.
>>> I believe the current behavior is correct.
>>>
>>> See http://marc.info/?l=linux-nfs&m=128200558207974&w=2 for a pynfs-side
>>> fix.
>>>
>>   Thanks.
>>
>>   But why we must return nfserr_inval at nfs layer, the commitarg.offset and
>>   writearg.offset are the U64 type, i think maybe we should set the vfs as the
>>   authority not nfs for whether the offset is valid when it over 2^63-1.
> 
> Hm, good question.  I took a quick look at vfs_fsync_range() and its
> other callers but couldn't immediately tell whether checking the
> validity of the range is its responsibility or the caller's.
> 
> If you can demonstrate that vfs_fsync_range() takes responsibility for
> the range-checking, then I'd be fine with removing the checks here.
> 

It looks like that vfs_fsync_range has not the range-checking, but i think
vfs_fsync_range should support the function of range-checking.

And NFSv4 write procedure will do the range-checking at rw_verify_area.

-- 
Regards
Bian Naimeng




--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux