summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dir-item.c
Commit message (Collapse)AuthorAgeFilesLines
* Btrfs: leave btree locks spinning more oftenChris Mason2009-03-241-0/+3
| | | | | | | | | | | | | | | | | | | | btrfs_mark_buffer dirty would set dirty bits in the extent_io tree for the buffers it was dirtying. This may require a kmalloc and it was not atomic. So, anyone who called btrfs_mark_buffer_dirty had to set any btree locks they were holding to blocking first. This commit changes dirty tracking for extent buffers to just use a flag in the extent buffer. Now that we have one and only one extent buffer per page, this can be safely done without losing dirty bits along the way. This also introduces a path->leave_spinning flag that callers of btrfs_search_slot can use to indicate they will properly deal with a path returned where all the locks are spinning instead of blocking. Many of the btree search callers now expect spinning paths, resulting in better btree concurrency overall. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix checkpatch.pl warningsChris Mason2009-01-051-1/+1
| | | | | | | 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>
* Btrfs: add and improve commentsChris Mason2008-09-291-0/+41
| | | | | | | | | | | This improves the comments at the top of many functions. It didn't dive into the guts of functions because I was trying to avoid merging problems with the new allocator and back reference work. extent-tree.c and volumes.c were both skipped, and there is definitely more work todo in cleaning and commenting the code. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add a write ahead tree log to optimize synchronous operationsChris Mason2008-09-251-0/+3
| | | | | | | | | | | File syncs and directory syncs are optimized by copying their items into a special (copy-on-write) log tree. There is one log tree per subvolume and the btrfs super block points to a tree of log tree roots. After a crash, items are copied out of the log tree and back into the subvolume. See tree-log.c for all the details. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: implement memory reclaim for leaf reference cacheYan2008-09-251-1/+0
| | | | | | | | | | | | | | The memory reclaiming issue happens when snapshot exists. In that case, some cache entries may not be used during old snapshot dropping, so they will remain in the cache until umount. The patch adds a field to struct btrfs_leaf_ref to record create time. Besides, the patch makes all dead roots of a given snapshot linked together in order of create time. After a old snapshot was completely dropped, we check the dead root list and remove all cache entries created before the oldest dead root in the list. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Implement new dir index formatJosef Bacik2008-09-251-2/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: unaligned access fixesDavid Miller2008-09-251-8/+4
| | | | | | | | | | | | | Btrfs set/get macros lose type information needed to avoid unaligned accesses on sparc64. ere is a patch for the kernel bits which fixes most of the unaligned accesses on sparc64. btrfs_name_hash is modified to return the hash value instead of getting a return location via a (potentially unaligned) pointer. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Implement ACLs setting and gettingYan2008-09-251-0/+3
| | | | | | ACLs are stored but not used for permission checks (yet) Signed-off-by: Chris Mason <chris.mason@oracle.com>
* xattr support for btrfsJosef Bacik2008-09-251-6/+94
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix a number of inline extent problems that Yan Zheng reported.Chris Mason2008-09-251-1/+1
| | | | | | | | | | | | | | | | | | The fixes do a number of things: 1) Most btrfs_drop_extent callers will try to leave the inline extents in place. It can truncate bytes off the beginning of the inline extent if required. 2) writepage can now update the inline extent, allowing mmap writes to go directly into the inline extent. 3) btrfs_truncate_in_transaction truncates inline extents 4) extent_map.c fixed to not merge inline extent mappings and hole mappings together Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Create extent_buffer interface for large blocksizesChris Mason2008-09-251-46/+56
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: trivial include fixupsZach Brown2007-07-111-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>
* Btrfs: Audit callers and return codes to make sure -ENOSPC gets up the stackChris Mason2007-06-221-3/+3
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs: Code cleanupAneesh2007-06-131-1/+0
| | | | | | | | | | | Attaching below is some of the code cleanups that i came across while reading the code. a) alloc_path already calls init_path. b) Mention that btrfs_inode is the in memory copy.Ext4 have ext4_inode_info as the in memory copy ext4_inode as the disk copy Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: add GPLv2Chris Mason2007-06-121-0/+18
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: renameChris Mason2007-05-231-6/+21
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: fix page cache memory leakChris Mason2007-05-021-5/+6
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: directory inode index is backChris Mason2007-04-191-60/+144
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: working file_write, reorganized key flagsChris Mason2007-04-181-70/+0
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: rework csums and extent item orderingChris Mason2007-04-171-9/+19
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: snapshot progressChris Mason2007-04-101-2/+4
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: start of support for many FS volumesChris Mason2007-04-061-5/+9
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: dirindex optimizationsChris Mason2007-04-051-1/+4
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: finish off inode indexing in dirs, add overflowsChris Mason2007-04-051-5/+69
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: more inode indexed directory workChris Mason2007-04-051-0/+18
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: add dir inode indexChris Mason2007-04-041-0/+19
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: dynamic allocation of path structChris Mason2007-04-021-8/+10
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: corruption hunt continuesChris Mason2007-03-301-4/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: hunting slab corruptionChris Mason2007-03-301-0/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Add generation number to btrfs_header, readdir fixes, hash collision fixesChris Mason2007-03-231-2/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs_create, btrfs_write_super, btrfs_sync_fsChris Mason2007-03-231-1/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Mountable btrfs, with readdirChris Mason2007-03-221-10/+7
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: initial move to kernel module landChris Mason2007-03-211-5/+7
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: transaction handles everywhereChris Mason2007-03-161-8/+12
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: add a name_len to dir items, reorder keyChris Mason2007-03-161-9/+5
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: directory testing code and dir item fixesChris Mason2007-03-151-41/+17
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Use a chunk of the key flags to record the item type.Chris Mason2007-03-151-0/+102
Add (untested and simple) directory item code Fix comp_keys to use the new key ordering Add btrfs_insert_empty_item Signed-off-by: Chris Mason <chris.mason@oracle.com>
OpenPOWER on IntegriCloud