- 06 2月, 2008 1 次提交
-
-
由 Christoph Lameter 提交于
Simplify page cache zeroing of segments of pages through 3 functions zero_user_segments(page, start1, end1, start2, end2) Zeros two segments of the page. It takes the position where to start and end the zeroing which avoids length calculations and makes code clearer. zero_user_segment(page, start, end) Same for a single segment. zero_user(page, start, length) Length variant for the case where we know the length. We remove the zero_user_page macro. Issues: 1. Its a macro. Inline functions are preferable. 2. The KM_USER0 macro is only defined for HIGHMEM. Having to treat this special case everywhere makes the code needlessly complex. The parameter for zeroing is always KM_USER0 except in one single case that we open code. Avoiding KM_USER0 makes a lot of code not having to be dealing with the special casing for HIGHMEM anymore. Dealing with kmap is only necessary for HIGHMEM configurations. In those configurations we use KM_USER0 like we do for a series of other functions defined in highmem.h. Since KM_USER0 is depends on HIGHMEM the existing zero_user_page function could not be a macro. zero_user_* functions introduced here can be be inline because that constant is not used when these functions are called. Also extract the flushing of the caches to be outside of the kmap. [akpm@linux-foundation.org: fix nfs and ntfs build] [akpm@linux-foundation.org: fix ntfs build some more] Signed-off-by: NChristoph Lameter <clameter@sgi.com> Cc: Steven French <sfrench@us.ibm.com> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: <linux-ext4@vger.kernel.org> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Anton Altaparmakov <aia21@cantab.net> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: David Chinner <dgc@sgi.com> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: Steven French <sfrench@us.ibm.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 17 10月, 2007 1 次提交
-
-
由 Nick Piggin 提交于
Signed-off-by: NNick Piggin <npiggin@suse.de> Cc: David Chinner <dgc@sgi.com> Cc: Timothy Shimmin <tes@sgi.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 16 10月, 2007 4 次提交
-
-
由 Lachlan McIlroy 提交于
Synchronous writes currently log inode changes before syncing pages to disk. Since the file size is updated on I/O completion we wont be writing out the updated file size and if we crash the file will have the wrong size. This change moves the logging after the syncing of the pages to ensure we log the correct file size. SGI-PV: 970334 SGI-Modid: xfs-linux-melb:xfs-kern:29649a Signed-off-by: NLachlan McIlroy <lachlan@sgi.com> Signed-off-by: NChristoph Hellwig <hch@infradead.org> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
由 Christoph Hellwig 提交于
Now that struct bhv_vfs doesn't have any members left we can kill it and go directly from the super_block to the xfs_mount everywhere. SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29509a Signed-off-by: NChristoph Hellwig <hch@infradead.org> Signed-off-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
由 Christoph Hellwig 提交于
We can easily get at the vfsp through the super_block but it will soon be gone anyway. SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29494a Signed-off-by: NChristoph Hellwig <hch@infradead.org> Signed-off-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
由 Christoph Hellwig 提交于
SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29493a Signed-off-by: NChristoph Hellwig <hch@infradead.org> Signed-off-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
- 15 10月, 2007 2 次提交
-
-
由 Christoph Hellwig 提交于
All vnode ops now take struct xfs_inode pointers and the behaviour related glue is split out into methods of it's own. This required fixing xfs_create/mkdir/symlink to not mess with the inode pointer but rather use a separate boolean for error handling. Thanks to Dave Chinner for that fix. SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29492a Signed-off-by: NChristoph Hellwig <hch@infradead.org> Signed-off-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
由 Christoph Hellwig 提交于
SGI-PV: 968690 SGI-Modid: xfs-linux-melb:xfs-kern:29340a Signed-off-by: NChristoph Hellwig <hch@infradead.org> Signed-off-by: NVlad Apostolov <vapo@sgi.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
- 10 7月, 2007 1 次提交
-
-
由 Jens Axboe 提交于
They can use generic_file_splice_read() instead. Since sys_sendfile() now prefers that, there should be no change in behaviour. Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
-
- 19 6月, 2007 1 次提交
-
-
由 Christoph Hellwig 提交于
SGI-PV: 957103 SGI-Modid: xfs-linux-melb:xfs-kern:28678a Signed-off-by: NChristoph Hellwig <hch@infradead.org> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
- 09 5月, 2007 1 次提交
-
-
由 Dmitriy Monakhov 提交于
[akpm@linux-foundation.org: cleanup] Signed-off-by: NMonakhov Dmitriy <dmonakhov@openvz.org> Cc: Christoph Hellwig <hch@lst.de> Acked-by: NAnton Altaparmakov <aia21@cam.ac.uk> Acked-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 08 5月, 2007 4 次提交
-
-
由 Lachlan McIlroy 提交于
In xfs_write() the iolock is dropped and reacquired in XFS_SEND_DATA() which means that the file could change from not-cached to cached and we need to redo the direct I/O checks. We should also redo the direct I/O checks when the file size changes regardless if O_APPEND is set or not. SGI-PV: 963483 SGI-Modid: xfs-linux-melb:xfs-kern:28440a Signed-off-by: NLachlan McIlroy <lachlan@sgi.com> Signed-off-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
由 Lachlan McIlroy 提交于
The problem that has been addressed is that of synchronising updates of the file size with writes that extend a file. Without the fix the update of a file's size, as a result of a write beyond eof, is independent of when the cached data is flushed to disk. Often the file size update would be written to the filesystem log before the data is flushed to disk. When a system crashes between these two events and the filesystem log is replayed on mount the file's size will be set but since the contents never made it to disk the file is full of holes. If some of the cached data was flushed to disk then it may just be a section of the file at the end that has holes. There are existing fixes to help alleviate this problem, particularly in the case where a file has been truncated, that force cached data to be flushed to disk when the file is closed. If the system crashes while the file(s) are still open then this flushing will never occur. The fix that we have implemented is to introduce a second file size, called the in-memory file size, that represents the current file size as viewed by the user. The existing file size, called the on-disk file size, is the one that get's written to the filesystem log and we only update it when it is safe to do so. When we write to a file beyond eof we only update the in- memory file size in the write operation. Later when the I/O operation, that flushes the cached data to disk completes, an I/O completion routine will update the on-disk file size. The on-disk file size will be updated to the maximum offset of the I/O or to the value of the in-memory file size if the I/O includes eof. SGI-PV: 958522 SGI-Modid: xfs-linux-melb:xfs-kern:28322a Signed-off-by: NLachlan McIlroy <lachlan@sgi.com> Signed-off-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
由 Lachlan McIlroy 提交于
This change addresses a race in xfs_write() where, for direct I/O, the flags need_i_mutex and need_flush are setup before the iolock is acquired. The logic used to setup the flags may change between setting the flags and acquiring the iolock resulting in these flags having incorrect values. For example, if a file is not currently cached then need_i_mutex is set to zero and then if the file is cached before the iolock is acquired we will fail to do the flushinval before the direct write. The flush (and also the call to xfs_zero_eof()) need to be done with the iolock held exclusive so we need to acquire the iolock before checking for cached data (or if the write begins after eof) to prevent this state from changing. For direct I/O I've chosen to always acquire the iolock in shared mode initially and if there is a need to promote it then drop it and reacquire it. There's also some other tidy-ups including removing the O_APPEND offset adjustment since that work is done in generic_write_checks() (and we don't use offset as an input parameter anywhere). SGI-PV: 962170 SGI-Modid: xfs-linux-melb:xfs-kern:28319a Signed-off-by: NLachlan McIlroy <lachlan@sgi.com> Signed-off-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
由 Lachlan McIlroy 提交于
This patch handles error return values in fs_flush_pages and fs_flushinval_pages. It changes the prototype of fs_flushinval_pages so we can propogate the errors and handle them at higher layers. I also modified xfs_itruncate_start so that it could propogate the error further. SGI-PV: 961990 SGI-Modid: xfs-linux-melb:xfs-kern:28231a Signed-off-by: NLachlan McIlroy <lachlan@sgi.com> Signed-off-by: NStewart Smith <stewart@flamingspork.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
- 10 2月, 2007 3 次提交
-
-
由 David Chinner 提交于
kmap() is inefficient and does not scale well. kmap_atomic() is a better choice. Use the generic wrapper function instead of open coding the kmap-memset-dcache flush-kunmap stuff. SGI-PV: 960904 SGI-Modid: xfs-linux-melb:xfs-kern:28041a Signed-off-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NChristoph Hellwig <hch@infradead.org> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
由 Eric Sandeen 提交于
xfs_mac.h and xfs_cap.h provide definitions and macros that aren't used anywhere in XFS at all. They are left-overs from "to be implement at some point in the future" functionality that Irix XFS has. If this functionality ever goes into Linux, it will be provided at a different layer, most likely through the security hooks in the kernel so we will never need this functionality in XFS. Patch provided by Eric Sandeen (sandeen@sandeen.net). SGI-PV: 960895 SGI-Modid: xfs-linux-melb:xfs-kern:28036a Signed-off-by: NEric Sandeen <sandeen@sandeen.net> Signed-off-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
由 Lachlan McIlroy 提交于
The problem is the two callers of xfs_iozero() are rounding out the range to be zeroed to the end of a fsb and in some cases this extends past the new eof. The call to commit_write() in xfs_iozero() will cause the Linux inode's file size to be set too high. SGI-PV: 960788 SGI-Modid: xfs-linux-melb:xfs-kern:28013a Signed-off-by: NLachlan McIlroy <lachlan@sgi.com> Signed-off-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
- 09 12月, 2006 1 次提交
-
-
由 Josef "Jeff" Sipek 提交于
Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the xfs filesystem. Signed-off-by: NJosef "Jeff" Sipek <jsipek@cs.sunysb.edu> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 01 10月, 2006 1 次提交
-
-
由 Badari Pulavarty 提交于
This patch cleans up generic_file_*_read/write() interfaces. Christoph Hellwig gave me the idea for this clean ups. In a nutshell, all filesystems should set .aio_read/.aio_write methods and use do_sync_read/ do_sync_write() as their .read/.write methods. This allows us to cleanup all variants of generic_file_* routines. Final available interfaces: generic_file_aio_read() - read handler generic_file_aio_write() - write handler generic_file_aio_write_nolock() - no lock write handler __generic_file_aio_write_nolock() - internal worker routine Signed-off-by: NBadari Pulavarty <pbadari@us.ibm.com> Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 28 9月, 2006 1 次提交
-
-
由 Nathan Scott 提交于
SGI-PV: 955696 SGI-Modid: xfs-linux-melb:xfs-kern:26908a Signed-off-by: NNathan Scott <nathans@sgi.com> Signed-off-by: NTim Shimmin <tes@sgi.com>
-
- 07 9月, 2006 2 次提交
-
-
由 David Chinner 提交于
xfs_splice_write() failed to update the on disk inode size when extending the so when the file was closed the range extended by splice was truncated off. Hence any region of a file written to by splice would end up as a hole full of zeros. SGI-PV: 955939 SGI-Modid: xfs-linux-melb:xfs-kern:26920a Signed-off-by: NDavid Chinner <dgc@sgi.com> Signed-off-by: NDavid Chatterton <chatz@sgi.com>
-
由 Lachlan McIlroy 提交于
__blockdev_direct_IO for the DIO_OWN_LOCKING case for direct I/O reads since it drops and reacquires the i_mutex while holding the iolock and this violates the locking order. SGI-PV: 955696 SGI-Modid: xfs-linux-melb:xfs-kern:26898a Signed-off-by: NLachlan McIlroy <lachlan@sgi.com> Signed-off-by: NDavid Chatterton <chatz@sgi.com>
-
- 20 6月, 2006 1 次提交
-
-
由 Nathan Scott 提交于
pure bloat. SGI-PV: 952969 SGI-Modid: xfs-linux-melb:xfs-kern:26251a Signed-off-by: NNathan Scott <nathans@sgi.com>
-
- 19 6月, 2006 1 次提交
-
-
由 Nathan Scott 提交于
sharing. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26248a Signed-off-by: NNathan Scott <nathans@sgi.com>
-
- 09 6月, 2006 5 次提交
-
-
由 Nathan Scott 提交于
SGI-PV: 953338 SGI-Modid: xfs-linux-melb:xfs-kern:26109a Signed-off-by: NNathan Scott <nathans@sgi.com>
-
由 Nathan Scott 提交于
porters. SGI-PV: 953338 SGI-Modid: xfs-linux-melb:xfs-kern:26108a Signed-off-by: NNathan Scott <nathans@sgi.com>
-
由 Nathan Scott 提交于
SGI-PV: 953338 SGI-Modid: xfs-linux-melb:xfs-kern:26107a Signed-off-by: NNathan Scott <nathans@sgi.com>
-
由 Nathan Scott 提交于
anymore here. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26094a Signed-off-by: NNathan Scott <nathans@sgi.com>
-
由 Olaf Weber 提交于
the range spanned by modifications to the in-core extent map. Add XFS_BUNMAPI() and XFS_SWAP_EXTENTS() macros that call xfs_bunmapi() and xfs_swap_extents() via the ioops vector. Change all calls that may modify the in-core extent map for the data fork to go through the ioops vector. This allows a cache of extent map data to be kept in sync. SGI-PV: 947615 SGI-Modid: xfs-linux-melb:xfs-kern:209226a Signed-off-by: NOlaf Weber <olaf@sgi.com> Signed-off-by: NNathan Scott <nathans@sgi.com>
-
- 11 4月, 2006 1 次提交
-
-
由 Jens Axboe 提交于
We need not use ->f_pos as the offset for the file input/output. If the user passed an offset pointer in through sys_splice(), just use that and leave ->f_pos alone. Signed-off-by: NJens Axboe <axboe@suse.de>
-
- 10 4月, 2006 1 次提交
-
-
由 Ingo Molnar 提交于
separate out the 'internal pipe object' abstraction, and make it usable to splice. This cleans up and fixes several aspects of the internal splice APIs and the pipe code: - pipes: the allocation and freeing of pipe_inode_info is now more symmetric and more streamlined with existing kernel practices. - splice: small micro-optimization: less pointer dereferencing in splice methods Signed-off-by: NIngo Molnar <mingo@elte.hu> Update XFS for the ->splice_read/->splice_write changes. Signed-off-by: NJens Axboe <axboe@suse.de>
-
- 31 3月, 2006 1 次提交
-
-
由 Nathan Scott 提交于
Signed-off-by: NNathan Scott <nathans@sgi.com>
-
- 29 3月, 2006 1 次提交
-
-
由 Nathan Scott 提交于
these typos. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:25539a Signed-off-by: NNathan Scott <nathans@sgi.com>
-
- 22 3月, 2006 1 次提交
-
-
由 Yingping Lu 提交于
the trace. SGI-PV: 948300 SGI-Modid: xfs-linux-melb:xfs-kern:208069a Signed-off-by: NYingping Lu <yingping@sgi.com> Signed-off-by: NNathan Scott <nathans@sgi.com>
-
- 17 3月, 2006 3 次提交
-
-
由 Nathan Scott 提交于
else we can hit a delalloc-extents-via-direct-io BUG. SGI-PV: 949916 SGI-Modid: xfs-linux-melb:xfs-kern:25483a Signed-off-by: NNathan Scott <nathans@sgi.com>
-
由 Nathan Scott 提交于
SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:25480a Signed-off-by: NNathan Scott <nathans@sgi.com>
-
由 Nathan Scott 提交于
SGI-PV: 947038 SGI-Modid: xfs-linux-melb:xfs-kern:25474a Signed-off-by: NNathan Scott <nathans@sgi.com>
-
- 11 1月, 2006 2 次提交
-
-
由 Nathan Scott 提交于
finally. SGI-PV: 947038 SGI-Modid: xfs-linux-melb:xfs-kern:24866a Signed-off-by: NNathan Scott <nathans@sgi.com>
-
由 Yingping Lu 提交于
was caused by ENOSPC but not Rreclaimed by xfs_release or xfs_inactive. The fix changed the condition in xfs_release and xfs_inactive to invoke xfs_inactive_free_eofblocks for this special case, changed xfs_inactive_free_eofblocks to clean the delayed blks after eof. It also changed xfs_write to set correct eof when ENOSPC occurs. SGI-PV: 946267 SGI-Modid: xfs-linux-melb:xfs-kern:203788a Signed-off-by: NYingping Lu <yingping@sgi.com> Signed-off-by: NNathan Scott <nathans@sgi.com>
-