summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode-map.c
AgeCommit message (Collapse)AuthorFilesLines
2009-09-21Btrfs: do not reuse objectid of deleted snapshot/subvolYan, Zheng1-78/+15
The new back reference format does not allow reusing objectid of deleted snapshot/subvol. So we use ++highest_objectid to allocate objectid for new snapshot/subvol. Now we use ++highest_objectid to allocate objectid for both new inode and new snapshot/subvolume, so this patch removes 'find hole' code in btrfs_find_free_objectid. Signed-off-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-04-27Btrfs: Fix a trivial warning using max() of u64 vs ULL.Joel Becker1-1/+1
A small warning popped up on ia64 because inode-map.c was comparing a u64 object id with the ULL FIRST_FREE_OBJECTID. My first thought was that all the OBJECTID constants should contain the u64 cast because btrfs code deals entirely in u64s. But then I saw how large that was, and figured I'd just fix the max() call. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-02-12Btrfs: remove btrfs_init_pathJeff Mahoney1-1/+0
btrfs_init_path was initially used when the path objects were on the stack. Now all the work is done by btrfs_alloc_path and btrfs_init_path isn't required. This patch removes it, and just uses kmem_cache_zalloc to zero out the object. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-01-05Btrfs: Fix checkpatch.pl warningsChris Mason1-1/+0
There were many, most are fixed now. struct-funcs.c generates some warnings but these are bogus. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-26Btrfs: extent_map and data=ordered fixes for space balancingZheng Yan1-0/+4
* Add an EXTENT_BOUNDARY state bit to keep the writepage code from merging data extents that are in the process of being relocated. This allows us to do accounting for them properly. * The balancing code relocates data extents indepdent of the underlying inode. The extent_map code was modified to properly account for things moving around (invalidating extent_map caches in the inode). * Don't take the drop_mutex in the create_subvol ioctl. It isn't required. * Fix walking of the ordered extent list to avoid races with sys_unlink * Change the lock ordering rules. Transaction start goes outside the drop_mutex. This allows btrfs_commit_transaction to directly drop the relocation trees. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Update find free objectid function for orphan cleanup codeZheng Yan1-7/+8
Orphan items use BTRFS_ORPHAN_OBJECTID (-5UUL) as key objectid. This affects the find free objectid functions, inode objectid can easily overflow after orphan file cleanup. --- Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Replace the big fs_mutex with a collection of other locksChris Mason1-0/+8
Extent alloctions are still protected by a large alloc_mutex. Objectid allocations are covered by a objectid mutex Other btree operations are protected by a lock on individual btree nodes Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Fix for btrfs_find_free_objectidYan1-3/+1
btrfs_find_free_objectid may return a used objectid due to arithmetic underflow. This bug may happen when parameter 'root' is tree root, so it may cause serious problems when creating snapshot or sub-volume. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Create extent_buffer interface for large blocksizesChris Mason1-8/+9
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-07-11Btrfs: trivial include fixupsZach Brown1-1/+0
Almost none of the files including module.h need to do so, remove them. Include sched.h in extent-tree.c to silence a warning about cond_resched() being undeclared. Signed-off-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-06-12Btrfs: add GPLv2Chris Mason1-0/+18
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-04-10Btrfs: drop the inode map treeChris Mason1-61/+4
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-04-05Btrfs: dirindex optimizationsChris Mason1-15/+33
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-04-04Btrfs: tweak the inode-map and free extent search starts on cold mountChris Mason1-7/+20
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-04-02Btrfs: corruptions fixedChris Mason1-18/+25
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-03-30Btrfs: corruption hunt continuesChris Mason1-1/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-03-27Btrfs: reference counts on data extentsChris Mason1-0/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-03-23btrfs_create, btrfs_write_super, btrfs_sync_fsChris Mason1-0/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-03-22Mountable btrfs, with readdirChris Mason1-4/+4
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-03-21Btrfs: initial move to kernel module landChris Mason1-4/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-03-20Btrfs: Add inode map, and the start of file extent itemsChris Mason1-0/+136
Signed-off-by: Chris Mason <chris.mason@oracle.com>