summaryrefslogtreecommitdiffstats
path: root/fs/ntfs/attrib.c
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] fs/ntfs: Conversion to generic booleanRichard Knutsson2006-10-011-27/+27
| | | | | | | | | 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] read_mapping_page for address spacePekka Enberg2006-06-231-4/+2
| | | | | | | | | | 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>
* NTFS: Remove all the make_bad_inode() calls. This should only be calledAnton Altaparmakov2006-03-231-6/+0
| | | | | | from read inode and new inode code paths. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Add support for sparse files which have a compression unit of 0.Anton Altaparmakov2006-03-231-8/+17
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix a buggette in an "should be impossible" case handling where weAnton Altaparmakov2006-03-231-2/+2
| | | | | | continued the attribute lookup loop instead of aborting it. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_semJes Sorensen2006-01-091-2/+2
| | | | | | | | | | | | | 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 compilation warnings with gcc-4.0.2 on SUSE 10.0.Anton Altaparmakov2005-10-241-1/+1
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: $EA attributes can be both resident non-resident.Anton Altaparmakov2005-10-191-1/+1
| | | | | | Minor tidying. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: In attrib.c::ntfs_attr_set() call balance_dirty_pages_ratelimited()Anton Altaparmakov2005-10-111-0/+4
| | | | | | | | and cond_resched() in the main loop as we could be dirtying a lot of pages and this ensures we play nice with the VM and the system as a whole. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Add fs/ntfs/attrib.[hc]::ntfs_attr_extend_allocation(), a function toAnton Altaparmakov2005-10-041-0/+634
| | | | | | | extend the allocation of an attributes. Optionally, the data size, but not the initialized size can be extended, too. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix ntfs_attr_make_non_resident() to update the vfs inode i_blocksAnton Altaparmakov2005-10-041-1/+3
| | | | | | | | which is zero for a resident attribute but should no longer be zero once the attribute is non-resident as it then has real clusters allocated. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Change ntfs_attr_make_non_resident to take the attribute value sizeAnton Altaparmakov2005-10-041-3/+10
| | | | | | | | | | as an extra parameter. This is needed since we need to know the size before we can map the mft record and our callers always know it. The reason we cannot simply read the size from the vfs inode i_size is that this is not necessarily uptodate. This happens when ntfs_attr_make_non_resident() is called in the ->truncate call path. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: - Change ntfs_cluster_alloc() to take an extra boolean parameterAnton Altaparmakov2005-10-041-9/+1
| | | | | | | | | | specifying whether the cluster are being allocated to extend an attribute or to fill a hole. - Change ntfs_attr_make_non_resident() to call ntfs_cluster_alloc() with @is_extension set to TRUE and remove the runlist terminator fixup code as this is now done by ntfs_cluster_alloc(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Change ntfs_attr_find_vcn_nolock() to also take an optional attributeAnton Altaparmakov2005-10-041-36/+48
| | | | | | | search context as argument. This allows calling it with the mft record mapped. Update all callers. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Change ntfs_map_runlist_nolock() to also take an optional attributeAnton Altaparmakov2005-10-041-31/+201
| | | | | | search context. This allows calling it with the mft record mapped. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix handling of sparse attributes in ntfs_attr_make_non_resident().Anton Altaparmakov2005-09-081-17/+36
| | | | | | | | Also, add BUG() checks to ntfs_attr_make_non_resident() and ntfs_attr_set() to ensure that these functions are never called for compressed or encrypted attributes. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix several bugs in fs/ntfs/attrib.c.Anton Altaparmakov2005-09-081-1/+31
| | | | | | | | | | | - Fix a bug in ntfs_map_runlist_nolock() where we forgot to protect access to the allocated size in the ntfs inode with the size lock. - Fix ntfs_attr_vcn_to_lcn_nolock() and ntfs_attr_find_vcn_nolock() to return LCN_ENOENT when there is no runlist and the allocated size is zero. - Fix load_attribute_list() to handle the case of a NULL runlist. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Add fs/ntfs/attrib.[hc]::ntfs_resident_attr_value_resize().Anton Altaparmakov2005-09-081-0/+40
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Prepare for 2.1.23 release: Update documentation and bump version.Anton Altaparmakov2005-06-251-1/+1
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Change ntfs_map_runlist_nolock() to only decompress the mapping pairsAnton Altaparmakov2005-06-251-19/+42
| | | | | | | | | | if the requested vcn is inside it. Otherwise we get into problems when we try to map an out of bounds vcn because we then try to map the already mapped runlist fragment which causes ntfs_mapping_pairs_decompress() to fail and return error. Update ntfs_attr_find_vcn_nolock() accordingly. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Add an extra parameter @last_vcn to ntfs_get_size_for_mapping_pairs()Anton Altaparmakov2005-06-251-2/+2
| | | | | | | | and ntfs_mapping_pairs_build() to allow the runlist encoding to be partial which is desirable when filling holes in sparse attributes. Update all callers. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Change the runlist terminator of the newly allocated cluster(s) toAnton Altaparmakov2005-06-251-0/+8
| | | | | | | LCN_ENOENT in ntfs_attr_make_non_resident(). Otherwise the runlist code gets confused. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Use C99 style structure initialization after memory allocation whereAnton Altaparmakov2005-05-271-9/+8
| | | | | | | possible (fs/ntfs/{attrib.c,index.c,super.c}). Thanks to Al Viro and Pekka Enberg. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Update attribute definition handling.Anton Altaparmakov2005-05-051-14/+7
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix compilation when configured read-only.Anton Altaparmakov2005-05-051-1/+12
| | | | | | | | | | - Add ifdef NTFS_RW around write specific code if fs/ntfs/runlist.[hc] and fs/ntfs/attrib.[hc]. - Minor bugfix to fs/ntfs/attrib.c::ntfs_attr_make_non_resident() where the runlist was not freed in all error cases. - Add fs/ntfs/runlist.[hc]::ntfs_rl_find_vcn_nolock(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Include linux/swap.h in fs/ntfs/attrib.c for mark_page_accessed().Anton Altaparmakov2005-05-051-0/+1
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: - Modify ->readpage and ->writepage (fs/ntfs/aops.c) so they detectAnton Altaparmakov2005-05-051-16/+25
| | | | | | | | | | and handle the case where an attribute is converted from resident to non-resident by a concurrent file write. - Reorder some operations when converting an attribute from resident to non-resident (fs/ntfs/attrib.c) so it is safe wrt concurrent ->readpage and ->writepage. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Add fs/ntfs/attrib.[hc]::ntfs_attr_make_non_resident().Anton Altaparmakov2005-05-051-0/+300
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: - Fix bug in fs/ntfs/attrib.c::ntfs_find_vcn_nolock() where afterAnton Altaparmakov2005-05-051-12/+17
| | | | | | | | | | dropping the read lock and taking the write lock we were not checking whether someone else did not already do the work we wanted to do. - Rename ntfs_find_vcn_nolock() to ntfs_attr_find_vcn_nolock(). - Tidy up some comments in fs/ntfs/runlist.c. - Add LCN_ENOMEM and LCN_EIO definitions to fs/ntfs/runlist.h. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Add fs/ntfs/attrib.[hc]::ntfs_attr_vcn_to_lcn_nolock() used by the newAnton Altaparmakov2005-05-051-0/+87
| | | | | | write code. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Add AT_EA in addition to AT_DATA to whitelist for being allowed to beAnton Altaparmakov2005-05-051-3/+4
| | | | | | non-resident in fs/ntfs/attrib.c::ntfs_attr_can_be_non_resident(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: - Split ntfs_map_runlist() into ntfs_map_runlist() and a non-lockingAnton Altaparmakov2005-05-051-45/+62
| | | | | | | | | | | | | helper ntfs_map_runlist_nolock() which is used by ntfs_map_runlist(). This allows us to map runlist fragments with the runlist lock already held without having to drop and reacquire it around the call. Adapt all callers. - Change ntfs_find_vcn() to ntfs_find_vcn_nolock() which takes a locked runlist. This allows us to find runlist elements with the runlist lock already held without having to drop and reacquire it around the call. Adapt all callers. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Use i_size_read() in fs/ntfs/attrib.c::ntfs_attr_set().Anton Altaparmakov2005-05-041-1/+5
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+1258
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!