summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
Commit message (Collapse)AuthorAgeFilesLines
* Btrfs: Add mount option to turn off data cowChris Mason2008-09-251-14/+108
| | | | | | | | | | | A number of workloads do not require copy on write data or checksumming. mount -o nodatasum to disable checksums and -o nodatacow to disable both copy on write and checksumming. In nodatacow mode, copy on write is still performed when a given extent is under snapshot. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add mount -o nodatasum to turn of file data checksummingChris Mason2008-09-251-1/+10
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Fixes for loopback files in btrfsChris Mason2008-09-251-2/+13
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix typo in .. check (thanks Yan)Chris Mason2008-09-251-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add backrefs for symbolic link inodesChris Mason2008-09-251-17/+13
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back pointers from the inode to the directory that references itChris Mason2008-09-251-141/+117
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add lowest key information to back refs for extent tree blocks as well.Chris Mason2008-09-251-10/+4
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back pointers from extents to the btree or file referencing themChris Mason2008-09-251-10/+28
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix buffer get/release issue in create_snapshotYan2008-09-251-2/+2
| | | | | | btrfs_cow_block expects a reference to be held on the buffer being cow'd. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* xattr support for btrfsJosef Bacik2008-09-251-1/+14
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add readpages supportChris Mason2008-09-251-1/+11
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Properly delete csum item in btrfs_truncate_in_trans.Yan2008-09-251-1/+2
| | | | | | | | | | When 'item_end' is equal to 'inode->i_size', 'found_type' is updated and current item is skipped. This behavior is correct for extent item, but incorrect for csum item. For example, there is a csum item with 'offset == 0'. When deleting the inode, 'inode->i_size' is set to 0, so the csum item isn't deleted. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add writepages supportChris Mason2008-09-251-0/+10
| | | | 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-19/+48
| | | | | | | | | | | | | | | | | | 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: Fix PAGE_CACHE_SHIFT shifts on 32 bit machinesChris Mason2008-09-251-7/+7
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Fix inline extent handling in btrfs_get_extentYan2008-09-251-16/+18
| | | | | | | | | | | | 1. Reorder kmap and the test for 'page != NULL' 2. Zero-fill rest area of a block when inline extent isn't big enough. 3. Do not insert extent_map into the map tree when page == NULL. (If insert the extent_map into the map tree, subsequent read requests will find it in the map tree directly and the corresponding inline extent data aren't copied into page by the the get_extent function. extent_read_full_page can't handle that case) Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Compile fixes for 2.6.24-rc1Chris Mason2008-09-251-1/+10
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Fix ENOTEMPTY check in btrfs_rmdirYan2008-09-251-1/+4
| | | | | | | | | | | The ENOTEMPTY check in btrfs_rmdir isn't reliable. It's possible that the backward search finds . or .. at first, then some other directory entry. In that case, btrfs_rmdir delete . or .. improperly. The patch also fixes a fs_mutex unlock issue in btrfs_rmdir. -- Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs_inode_by_name return random value.Yan2008-09-251-2/+3
| | | | | | | | | When inode is found, the return value is from the uninitialized variable 'ret'. -- Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Off by one fixes in extent_map.cYan2008-09-251-0/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Optimize csum insertion to create larger items when possibleChris Mason2008-09-251-1/+1
| | | | | | | This reduces the number of calls to btrfs_extend_item and greatly lowers the cpu usage while writing large files. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: KM_IRQ0 usage in end_io handlingJens Axboe2008-09-251-0/+4
| | | | | | | | endio handling is typically called with interrupts disabled, but can also be called with it enabled. So save interrupts before using KM_IRQ0 to be completely safe. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs: 32-bit type problemsJens Axboe2008-09-251-1/+1
| | | | | | An assorted set of casts to get rid of the warnings on 32-bit archs. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back file data checksummingChris Mason2008-09-251-11/+10
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back metadata checksummingChris Mason2008-09-251-4/+0
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Allow tails larger than one pageChris Mason2008-09-251-12/+20
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Allow tree blocks larger than the page sizeChris Mason2008-09-251-46/+44
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Create extent_buffer interface for large blocksizesChris Mason2008-09-251-168/+267
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs_get_extent should treat inline extents as though they hold a whole blockChris Mason2008-09-251-5/+7
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: factor page private preparations into a helperChristoph Hellwig2008-09-251-6/+1
| | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix double free and off by one in inode.cYan2008-09-251-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>
* Btrfs: truncate: don't update inode->i_blocks when extent is a holeYan2008-09-251-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>
* create btrfs_path slab with the correct sizeYan2008-09-251-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* fix found_type decrement in btrfs_truncate_in_transYan2008-09-251-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>
* Btrfs: Use balance_dirty_pages_nr on btree blocksChris Mason2008-09-251-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>
* split up btrfs_ioctlChristoph Hellwig2007-09-141-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>
* Btrfs: use unlocked_ioctlChristoph Hellwig2007-09-141-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>
* Btrfs: Fix extra link count dec in renameChris Mason2007-09-141-7/+0
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: [PATCH] extent_map: provide generic bmapChristoph Hellwig2007-09-101-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>
* Btrfs: Add more synchronization before creating a snapshotChris Mason2007-09-101-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>
* Add support for defragging files via btrfsctl -d. Avoid OOM on extent treeChris Mason2007-09-101-12/+81
| | | | | | defrag. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: fsx delalloc fixesChris Mason2007-08-301-163/+14
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add file data csums back in via hooks in the extent map codeChris Mason2007-08-301-3/+95
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix mknod to properly send rdev info back to diskYan2007-08-291-0/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add per-root block accounting and sysfs entriesJosef Bacik2007-08-291-4/+9
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add delayed allocation to the extent based page tree codeChris Mason2007-08-271-62/+79
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Extent based page cache code. This uses an rbtree of extents and testsChris Mason2007-08-271-510/+306
| | | | | | instead of buffer heads. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Make sure to cow the root during a snapshotChris Mason2007-08-271-0/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Do more extensive readahead during tree searchesChris Mason2007-08-271-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: delay commits during fsync to allow more writersJosef Bacik2007-08-101-0/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
OpenPOWER on IntegriCloud