summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
AgeCommit message (Collapse)AuthorFilesLines
2008-09-25Btrfs: factor page private preparations into a helperChristoph Hellwig1-6/+1
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix double free and off by one in inode.cYan1-2/+1
The first change removes potential double free, the second fix a off by one error. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: truncate: don't update inode->i_blocks when extent is a holeYan1-4/+6
I think check whether extent is a hole before update 'inode->i_blocks' is unconditional required. (original codes check it only when del_item isn't equal to 0) Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25create btrfs_path slab with the correct sizeYan1-1/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25fix found_type decrement in btrfs_truncate_in_transYan1-1/+1
found_type has already been decreased by codes above the change, I think decrease it by one again doesn't make sense. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Use balance_dirty_pages_nr on btree blocksChris Mason1-12/+35
btrfs_btree_balance_dirty is changed to pass the number of pages dirtied for more accurate dirty throttling. This lets the VM make better decisions about when to force some writeback. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-09-14split up btrfs_ioctlChristoph Hellwig1-47/+59
Add a helper per ioctl function to make the code more readable. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-09-14Btrfs: use unlocked_ioctlChristoph Hellwig1-18/+5
No reason to grab the BKL before calling into the btrfs ioctl code. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-09-14Btrfs: Fix extra link count dec in renameChris Mason1-7/+0
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-09-11Btrfs: [PATCH] extent_map: provide generic bmapChristoph Hellwig1-21/+2
generic_bmap is completely trivial, while the extent to bh mapping in btrfs is rather complex. So provide a extent_bmap instead that takes a get_extent callback and can be used by filesystem using the extent_map code. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-09-11Btrfs: Add more synchronization before creating a snapshotChris Mason1-1/+9
File data checksums are only done during writepage, so we have to make sure all pages are written when the snapshot is taken. This also adds some locking so that new writes don't race in and add new dirty pages. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-09-11Add support for defragging files via btrfsctl -d. Avoid OOM on extent treeChris Mason1-12/+81
defrag. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-30Btrfs: fsx delalloc fixesChris Mason1-163/+14
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-30Btrfs: Add file data csums back in via hooks in the extent map codeChris Mason1-3/+95
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-29Btrfs: Fix mknod to properly send rdev info back to diskYan1-0/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-29Btrfs: Add per-root block accounting and sysfs entriesJosef Bacik1-4/+9
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-28Btrfs: Add delayed allocation to the extent based page tree codeChris Mason1-62/+79
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-28Btrfs: Extent based page cache code. This uses an rbtree of extents and testsChris Mason1-510/+306
instead of buffer heads. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-28Btrfs: Make sure to cow the root during a snapshotChris Mason1-0/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-28Btrfs: Do more extensive readahead during tree searchesChris Mason1-1/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-11Btrfs: delay commits during fsync to allow more writersJosef Bacik1-0/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-10Btrfs: Btree defrag on the extent-mapping tree as wellChris Mason1-21/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-08Btrfs: Add run time btree defrag, and an ioctl to force btree defragChris Mason1-3/+30
This adds two types of btree defrag, a run time form that tries to defrag recently allocated blocks in the btree when they are still in ram, and an ioctl that forces defrag of all btree blocks. File data blocks are not defragged yet, but this can make a huge difference in sequential btree reads. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-07Btrfs: Fold some btree readahead routines into something more generic.Chris Mason1-67/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-07-25Btrfs: deal with api changes in 2.6.23-rc1Chris Mason1-24/+26
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-07-11Btrfs: Implement mknodJosef Bacik1-6/+66
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-28Btrfs: crash recovery fixesChris Mason1-3/+3
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-06-25Btrfs: Fix mtime and ctime updates on parent dirsChris Mason1-1/+5
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-06-22Btrfs: Add the ability to find and remove dead roots after a crash.Chris Mason1-0/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-06-22Btrfs: Audit callers and return codes to make sure -ENOSPC gets up the stackChris Mason1-58/+107
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-06-18Subject: Rework btrfs_file_write to only allocate while page locks are heldChris Mason1-4/+7
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-06-15Btrfs: patch queue: page_mkwriteChris Mason1-6/+297
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-06-14btrfs: Code cleanupAneesh1-9/+1
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>
2007-06-12Btrfs: i386 fixes from axboeChris Mason1-2/+1
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-06-12Btrfs: no slashes in subvolume namesChris Mason1-0/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-06-12Btrfs: split up super.cChris Mason1-0/+2210
Signed-off-by: Chris Mason <chris.mason@oracle.com>