lkml.org 
[lkml]   [2009]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subject[patch] small sendfile fixes
From
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.

Git patch is against 2.6.30. I'd like Al to take a look and make sure
my logic is right before applying.

Robert

From: Mandeep Singh Baines <msb@google.com>
Signed-off-by: Robert Love <rlove@google.com>


\
 
 \ /
  Last update: 2009-06-22 20:19    [W:0.038 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site