summaryrefslogtreecommitdiffstats
path: root/fs/ntfs/file.c
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] mark struct inode_operations const 2Arjan van de Ven2007-02-121-2/+2
| | | | | | | | | | | Many struct inode_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] ntfs: change uses of f_{dentry, vfsmnt} to use f_pathJosef "Jeff" Sipek2006-12-081-1/+1
| | | | | | | | | Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the ntfs filesystem code. Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Streamline generic_file_* interfaces and filemap cleanupsBadari Pulavarty2006-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Remove readv/writev methods and use aio_read/aio_write insteadBadari Pulavarty2006-10-011-2/+0Star
| | | | | | | | | | This patch removes readv() and writev() methods and replaces them with aio_read()/aio_write() methods. Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Vectorize aio_read/aio_write fileop methodsBadari Pulavarty2006-10-011-5/+3Star
| | | | | | | | | | | | This patch vectorizes aio_read() and aio_write() methods to prepare for collapsing all aio & vectored operations into one interface - which is aio_read()/aio_write(). Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Michael Holzheu <HOLZHEU@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fs/ntfs: Conversion to generic booleanRichard Knutsson2006-10-011-17/+17
| | | | | | | | | Conversion of booleans to: generic-boolean.patch (2006-08-23) Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Signed-off-by: Anton Altaparmakov <aia21@cantab.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Prepare for __copy_from_user_inatomic to not zero missed bytesNeilBrown2006-06-251-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that when we write to a file, the copy from userspace to pagecache is first done with preemption disabled, so if the source address is not immediately available the copy fails *and* *zeros* *the* *destination*. This is a problem because a concurrent read (which admittedly is an odd thing to do) might see zeros rather that was there before the write, or what was there after, or some mixture of the two (any of these being a reasonable thing to see). If the copy did fail, it will immediately be retried with preemption re-enabled so any transient problem with accessing the source won't cause an error. The first copying does not need to zero any uncopied bytes, and doing so causes the problem. It uses copy_from_user_atomic rather than copy_from_user so the simple expedient is to change copy_from_user_atomic to *not* zero out bytes on failure. The first of these two patches prepares for the change by fixing two places which assume copy_from_user_atomic does zero the tail. The two usages are very similar pieces of code which copy from a userspace iovec into one or more page-cache pages. These are changed to remove the assumption. The second patch changes __copy_from_user_inatomic* to not zero the tail. Once these are accepted, I will look at similar patches of other architectures where this is important (ppc, mips and sparc being the ones I can find). This patch: There is a problem with __copy_from_user_inatomic zeroing the tail of the buffer in the case of an error. As it is called in atomic context, the error may be transient, so it results in zeros being written where maybe they shouldn't be. In the usage in filemap, this opens a window for a well timed read to see data (zeros) which is not consistent with any ordering of reads and writes. Most cases where __copy_from_user_inatomic is called, a failure results in __copy_from_user being called immediately. As long as the latter zeros the tail, the former doesn't need to. However in *copy_from_user_iovec implementations (in both filemap and ntfs/file), it is assumed that copy_from_user_inatomic will zero the tail. This patch removes that assumption, so that after this patch it will be safe for copy_from_user_inatomic to not zero the tail. This patch also adds some commentary to filemap.h and asm-i386/uaccess.h. After this patch, all architectures that might disable preempt when kmap_atomic is called need to have their __copy_from_user_inatomic* "fixed". This includes - powerpc - i386 - mips - sparc Signed-off-by: Neil Brown <neilb@suse.de> Cc: David Howells <dhowells@redhat.com> Cc: Anton Altaparmakov <aia21@cantab.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] read_mapping_page for address spacePekka Enberg2006-06-231-2/+1Star
| | | | | | | | | | Add read_mapping_page() which is used for callers that pass mapping->a_ops->readpage as the filler for read_cache_page. This removes some duplication from filesystem code. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] NTFS: Critical bug fix (affects MIPS and possibly others)Anton Altaparmakov2006-06-231-6/+7
| | | | | | | | | Many thanks to Pauline Ng for the detailed bug report and analysis! Signed-off-by: Anton Altaparmakov <aia21@cantab.net> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Make most file operations structs in fs/ constArjan van de Ven2006-03-281-2/+2
| | | | | | | | | | | | | | This is a conversion to make the various file_operations structs in fs/ const. Basically a regexp job, with a few manual fixups The goal is both to increase correctness (harder to accidentally write to shared datastructures) and reducing the false sharing of cachelines with things that get dirty in .data (while .rodata is nicely read only and thus cache clean) Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* NTFS: Remove all the make_bad_inode() calls. This should only be calledAnton Altaparmakov2006-03-231-12/+1Star
| | | | | | from read inode and new inode code paths. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix two compiler warnings on Alpha. Thanks to Andrew Morton forAnton Altaparmakov2006-03-071-1/+2
| | | | | | reporting them. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Implement support for sector sizes above 512 bytes (up to the maximumAnton Altaparmakov2006-02-241-4/+4
| | | | supported by NTFS which is 4096 bytes).
* Merge branch 'master' of /usr/src/ntfs-2.6/Anton Altaparmakov2006-01-191-10/+10
|\
| * [PATCH] replace inode_update_time with file_update_timeChristoph Hellwig2006-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To allow various options to work per-mount instead of per-sb we need a struct vfsmount when updating ctime and mtime. This preparation patch replaces the inode_update_time routine with a file_update_atime routine so we can easily get at the vfsmount. (and the file makes more sense in this context anyway). Also get rid of the unused second argument - we always want to update the ctime when calling this routine. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@ftp.linux.org.uk> Cc: Anton Altaparmakov <aia21@cantab.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_semJes Sorensen2006-01-101-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar <mingo@elte.hu> (finished the conversion) Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | NTFS: Fix a potential overflow by casting (index + 1) to s64 before doing aAnton Altaparmakov2005-11-241-1/+1
|/ | | | | | | left shift using PAGE_CACHE_SHIFT in fs/ntfs/file.c. Thanks to Andrew Morton pointing this out to. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix a stupid bug causing writes to non-initialized pages to segfault.Anton Altaparmakov2005-11-011-8/+9
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix compilation warnings with gcc-4.0.2 on SUSE 10.0.Anton Altaparmakov2005-10-241-15/+8Star
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Use %z for size_t to fix compilation warnings. (Andrew Morton)Anton Altaparmakov2005-10-241-2/+2
| | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix serious data corruption issue when writing.Anton Altaparmakov2005-10-191-0/+1
| | | | | | | Many thanks to Alberto Patino for testing and reporting the data corruption. And many apologies for corrupting his partition. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: $EA attributes can be both resident non-resident.Anton Altaparmakov2005-10-191-0/+14
| | | | | | Minor tidying. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: The big ntfs write(2) rewrite has arrived. We now implement our ownAnton Altaparmakov2005-10-111-32/+2215
| | | | | | | | | | | | | | | file operations ->write(), ->aio_write(), and ->writev() for regular files. This replaces the old use of generic_file_write(), et al and the address space operations ->prepare_write and ->commit_write. This means that both sparse and non-sparse (unencrypted and uncompressed) files can now be extended using the normal write(2) code path. There are two limitations at present and these are that we never create sparse files and that we only have limited support for highly fragmented files, i.e. ones whose data attribute is split across multiple extents. When such a case is encountered, EOPNOTSUPP is returned. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Remove bogus setting of PageError in ntfs_read_compressed_block().Anton Altaparmakov2005-09-081-2/+7
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Use i_size_read() in fs/ntfs/file.c::ntfs_file_open().Anton Altaparmakov2005-05-041-1/+1
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* Linux-2.6.12-rc2Linus Torvalds2005-04-171-0/+155
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!