Re: [patch 09/12] sendfile: several fixes

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

 



On Thu, Aug 06, 2009 at 04:10:15PM -0700, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> From: Mandeep Singh Baines <msb@xxxxxxxxxx>
> 
> Three fixes for sendfile, mostly related to sending large files from pseudo
> filesystems:
> 
> - Fix sendfile for offsets > 300G. This can happen with pseudo filesystems.
>   This happens because the overflow check is using inode->i_sb->s_maxbytes
>   and not the superblock of the backing device's s_maxbytes. For a regular file
>   these are interchangible but for a special file these are different and you
>   want the latter.
> 
> - Don't compare against the max of the out_inode's superblock. Doesn't make
>   sense.
> 
> - For pseudo and other filesystems with s_maxbytes set to ~0ULL, max ends up
>   holding a negative number as it is signed. Check for and correct that.

The right fix is to not set s_maxbytes to ~0ULL.  Jeff Layton has sent
some patches for that recently.

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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux