aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/super.c
AgeCommit message (Collapse)AuthorFilesLines
2008-09-25Btrfs: Replace the big fs_mutex with a collection of other locksChris Mason1-2/+0
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 <[email protected]>
2008-09-25Btrfs: Add a mount option to control worker thread pool sizeChris Mason1-1/+12
mount -o thread_pool_size changes the default, which is min(num_cpus + 2, 8). Larger thread pools would make more sense on very large disk arrays. This mount option controls the max size of each thread pool. There are multiple thread pools, so the total worker count will be larger than the mount option. Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Fix mount -o max_inline=0Chris Mason1-2/+5
max_inline=0 used to force the max_inline size to one sector instead. Now it properly disables inline data items, while still being able to read any that happen to exist on disk. Signed-off-by: Chris Mason <[email protected]>
2008-09-25btrfs: allow scanning multiple devices during mountChristoph Hellwig1-5/+16
Allows to specify one or multiple device=/dev/foo options during mount so that ioctls on the control device can be avoided. Especially useful when trying to mount a multi-device setup as root. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2008-09-25btrfs: sanity mount option parsing and early mount codeChristoph Hellwig1-105/+136
Also adds lots of comments to describe what's going on here. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: transaction ioctlsSage Weil1-1/+1
These ioctls let a user application hold a transaction open while it performs a series of operations. A final ioctl does a sync on the fs (closing the current transaction). This is the main requirement for Ceph's OSD to be able to keep the data it's storing in a btrfs volume consistent, and AFAICS it works just fine. The application would do something like fd = ::open("some/file", O_RDONLY); ::ioctl(fd, BTRFS_IOC_TRANS_START); /* do a bunch of stuff */ ::ioctl(fd, BTRFS_IOC_TRANS_END); or just ::close(fd); And to ensure it commits to disk, ::ioctl(fd, BTRFS_IOC_SYNC); When a transaction is held open, the trans_handle is attached to the struct file (via private_data) so that it will get cleaned up if the process dies unexpectedly. A held transaction is also ended on fsync() to avoid a deadlock. A misbehaving application could also deliberately hold a transaction open, effectively locking up the FS, so it may make sense to restrict something like this to root or something. Signed-off-by: Chris Mason <[email protected]>
2008-09-25btrfsctl -A error code fixupLinda Knippers1-2/+2
Send the error back to userland if the ioctl fails Signed-off-by: Chris Mason <[email protected]>
2008-09-25btrfs delete ordered inode handling fixMingming1-1/+0
Use btrfs_release_file instead of a put_inode call Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Add mount -o degraded to allow mounts to continue with missing devicesChris Mason1-10/+15
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Add support for online device removalChris Mason1-27/+8
This required a few structural changes to the code that manages bdev pointers: The VFS super block now gets an anon-bdev instead of a pointer to the lowest bdev. This allows us to avoid swapping the super block bdev pointer around at run time. The code to read in the super block no longer goes through the extent buffer interface. Things got ugly keeping the mapping constant. Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Add new ioctl to add devicesChris Mason1-0/+1
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Fix btrfs_fill_super to return -EINVAL when no FS foundYan1-2/+2
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Add support for device scanning and detection ioctlsChris Mason1-17/+44
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Add /dev/btrfs-control for device scanning ioctlsChris Mason1-1/+40
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Misc 2.6.25 updatesChris Mason1-1/+10
Remove the btrfs read_inode method, and use save_mount_options Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: mount -o max_inline=size to control the maximum inline extent sizeChris Mason1-1/+18
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Split the extent_map code into two partsChris Mason1-1/+9
There is now extent_map for mapping offsets in the file to disk and extent_io for state tracking, IO submission and extent_bufers. The new extent_map code shifts from [start,end] pairs to [start,len], and pushes the locking out into the caller. This allows a few performance optimizations and is easier to use. A number of extent_map usage bugs were fixed, mostly with failing to remove extent_map entries when changing the file. Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Add basic lockfs callsYan1-1/+13
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Add mount -o ssd, which includes optimizations for seek free storageChris Mason1-1/+8
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Run igrab on data=ordered inodes to prevent deadlocks during writeoutChris Mason1-1/+1
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Add drop inode func to avoid data=ordered deadlockChris Mason1-0/+1
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Add flush barriers on commitChris Mason1-1/+8
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Add readahead to the online shrinker, and a mount -o alloc_start= for ↵Chris Mason1-1/+15
testing Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Support for online FS resize (grow and shrink)Chris Mason1-3/+4
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Back port to 2.6.18-el kernelsChris Mason1-0/+1
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Add mount option to enforce a max extent sizeChris Mason1-1/+45
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Add mount option to turn off data cowChris Mason1-7/+27
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 <[email protected]>
2008-09-25Btrfs: Add mount -o nodatasum to turn of file data checksummingChris Mason1-2/+15
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Return value checking in module initWyatt Banks1-3/+18
Signed-off-by: Chris Mason <[email protected]>
2008-09-25xattr support for btrfsJosef Bacik1-0/+2
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Allow tails larger than one pageChris Mason1-2/+0
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Allow tree blocks larger than the page sizeChris Mason1-2/+4
Signed-off-by: Chris Mason <[email protected]>
2008-09-25Btrfs: Create extent_buffer interface for large blocksizesChris Mason1-3/+4
Signed-off-by: Chris Mason <[email protected]>
2007-08-29Btrfs: Use mount -o subvol to select the subvol directory instead of dev:Chris Mason1-10/+39
Signed-off-by: Chris Mason <[email protected]>
2007-08-29Btrfs: Add mount into directory supportYan1-3/+120
Modified form of original patch from Christoph Hellwig to make btrfs mount into the default subvolume by default. mount /dev/somedevice:subvolumename to get other subvolumes or mount /dev/somedevice:. to get the root Signed-off-by: Chris Mason <[email protected]>
2007-08-29Btrfs: Add per-root block accounting and sysfs entriesJosef Bacik1-0/+14
Signed-off-by: Chris Mason <[email protected]>
2007-08-27Btrfs: Add delayed allocation to the extent based page tree codeChris Mason1-0/+1
Signed-off-by: Chris Mason <[email protected]>
2007-08-27Btrfs: Extent based page cache code. This uses an rbtree of extents and testsChris Mason1-0/+2
instead of buffer heads. Signed-off-by: Chris Mason <[email protected]>
2007-08-10Btrfs: Btree defrag on the extent-mapping tree as wellChris Mason1-0/+2
Signed-off-by: Chris Mason <[email protected]>
2007-06-26Btrfs: Fix super block updates during transaction commitChris Mason1-1/+1
The super block written during commit was not consistent with the state of the trees. This change adds an in-memory copy of the super so that we can make sure to write out consistent data during a commit. Signed-off-by: Chris Mason <[email protected]>
2007-06-22Btrfs: Audit callers and return codes to make sure -ENOSPC gets up the stackChris Mason1-2/+1
Signed-off-by: Chris Mason <[email protected]>
2007-06-12Btrfs: add GPLv2Chris Mason1-0/+18
Signed-off-by: Chris Mason <[email protected]>
2007-06-12Btrfs: split up super.cChris Mason1-2867/+12
Signed-off-by: Chris Mason <[email protected]>
2007-06-11Btrfs: fix oops after block group lookupChris Mason1-6/+2
Signed-off-by: Chris Mason <[email protected]>
2007-06-09Btrfs: remove device treeChris Mason1-88/+0
Signed-off-by: Chris Mason <[email protected]>
2007-06-08Btrfs: add compat ioctlChris Mason1-2/+25
Signed-off-by: Chris Mason <[email protected]>
2007-06-07Btrfs: d_type optimizationChris Mason1-9/+57
Signed-off-by: Chris Mason <[email protected]>
2007-05-29Btrfs: fixup various fsx failuresChris Mason1-32/+181
Signed-off-by: Chris Mason <[email protected]>
2007-05-24Btrfs: sparse files!Chris Mason1-22/+99
Signed-off-by: Chris Mason <[email protected]>
2007-05-24Btrfs: symlinks and hard linksChris Mason1-16/+147
Signed-off-by: Chris Mason <[email protected]>