aboutsummaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)AuthorFilesLines
2011-03-10/proc/self is never going to be invalidated...Al Viro1-30/+0
Signed-off-by: Al Viro <[email protected]>
2011-03-10Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/coreJens Axboe59-405/+66
Conflicts: block/blk-core.c block/blk-flush.c drivers/md/raid1.c drivers/md/raid10.c drivers/md/raid5.c fs/nilfs2/btnode.c fs/nilfs2/mdt.c Signed-off-by: Jens Axboe <[email protected]>
2011-03-10block: kill off REQ_UNPLUGJens Axboe11-30/+22
With the plugging now being explicitly controlled by the submitter, callers need not pass down unplugging hints to the block layer. If they want to unplug, it's because they manually plugged on their own - in which case, they should just unplug at will. Signed-off-by: Jens Axboe <[email protected]>
2011-03-10aio: remove request submission batchingJens Axboe1-72/+3
This should be useless now that we have on-stack plugging. So lets just kill it. Signed-off-by: Jens Axboe <[email protected]>
2011-03-10fs: make aio plugShaohua Li1-0/+4
Signed-off-by: Shaohua Li <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2011-03-10fs: make mpage read/write_pages() plugJens Axboe1-0/+8
Signed-off-by: Jens Axboe <[email protected]>
2011-03-10block: remove per-queue pluggingJens Axboe51-305/+32
Code has been converted over to the new explicit on-stack plugging, and delay users have been converted to use the new API for that. So lets kill off the old plugging along with aops->sync_page(). Signed-off-by: Jens Axboe <[email protected]>
2011-03-09Merge branch 'for-2.6.38' of git://linux-nfs.org/~bfields/linuxLinus Torvalds3-9/+10
* 'for-2.6.38' of git://linux-nfs.org/~bfields/linux: nfsd: wrong index used in inner loop nfsd4: fix bad pointer on failure to find delegation NFSD: fix decode_cb_sequence4resok
2011-03-09Merge branch 'for-linus' of ↵Linus Torvalds3-7/+22
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: nd->inode is not set on the second attempt in path_walk() unfuck proc_sysctl ->d_compare() minimal fix for do_filp_open() race
2011-03-09block: Don't check events while open is in progressTejun Heo1-7/+10
Not all block drivers clear events immediately after reporting. Some do so in ->revalidate_disk() or other steps during ->open(). There is a slim chance event poll may happen between the clearing event check from check_disk_change() and the actual clearing of the events which would result in spurious events. Block event checks while block device open is in progress. There is no need to kick explicit event check afterwards as events are always checked during open. -v2: The original patch could have called disk_unblock_events() with an already released or %NULL @disk causing oops. Fixed by making sure references are put after disk_unblock_events() is called. It also makes the error path of __blkdev_get() a bit simpler. This problem was reported by Jens. Signed-off-by: Tejun Heo <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Kay Sievers <[email protected]>
2011-03-09block: Don't check events on close unless it was blockedTejun Heo1-4/+2
The block event mechanism currently always checks events when the device is being closed regardless of the open mode. The intention was to allow detection of EJECT_REQUEST when a device is closed whether disk event polling is enabled or not. This is unnecessary as, for devices of interest, events are checked from either userland or kernel and in the former case ->check_events() is performed on open of each poll attempt anyway. Furthermore, this unconditional event check on close makes the code susceptible to event loop if the block driver doesn't clear reported events correctly - an event triggers userland to open and close the device which in turn causes another event, rinse and repeat. Check events on close only if it was blocked by excl write open. Signed-off-by: Tejun Heo <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Kay Sievers <[email protected]>
2011-03-09block: Don't implicitly trigger event check on disk_unblock_events()Tejun Heo1-0/+1
Currently, disk_unblock_events() implicitly kick event check if the block count reaches zero. This behavior is not described in the comment and hinders with future changes. Make the unblocker explicitly check events by calling disk_check_events() as necessary. This patch doesn't cause any behavior difference. Signed-off-by: Tejun Heo <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Kay Sievers <[email protected]>
2011-03-09xfs: factor agf counter updates into a helperChristoph Hellwig1-61/+68
Updating the AGF and transactions counters is duplicated between allocating and freeing extents. Factor the code into a common helper. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Alex Elder <[email protected]>
2011-03-09xfs: clean up the xfs_alloc_compute_aligned calling conventionChristoph Hellwig1-16/+13
Pass a xfs_alloc_arg structure to xfs_alloc_compute_aligned and derive the alignment and minlen paramters from it. This cleans up the existing callers, and we'll need even more information from the xfs_alloc_arg in subsequent patches. Based on a patch from Dave Chinner. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Alex Elder <[email protected]>
2011-03-09GFS2: Remove potential race in flock codeSteven Whitehouse1-2/+4
This patch ensures that we always wait for glock demotion when dropping flocks on a file in order to prevent any race conditions associated with further flock calls or closing the file. Signed-off-by: Steven Whitehouse <[email protected]>
2011-03-09GFS2: Fix glock deallocation raceSteven Whitehouse4-11/+12
This patch fixes a race in deallocating glocks which was introduced in the RCU glock patch. We need to ensure that the glock count is kept correct even in the case that there is a race to add a new glock into the hash table. Also, to avoid having to wait for an RCU grace period, the glock counter can be decremented before call_rcu() is called. Signed-off-by: Steven Whitehouse <[email protected]>
2011-03-09GFS2: quota allows exceeding hard limitAbhijith Das2-1/+8
Immediately after being synced to disk, cached quotas are zeroed out and a subsequent access of the cached quotas results in incorrect zero values. This meant that gfs2 assumed the actual usage to be the zero (or near-zero) usage values it found in the cached quotas and comparison against warn/limits never triggered a quota violation. This patch adds a new flag QDF_REFRESH that is set after a sync so that the cached quotas are forcefully refreshed from disk on a subsequent access on seeing this flag set. Resolves: rhbz#675944 Signed-off-by: Abhi Das <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2011-03-09nilfs2: get rid of nilfs_sb_info structureRyusuke Konishi12-134/+68
This directly uses sb->s_fs_info to keep a nilfs filesystem object and fully removes the intermediate nilfs_sb_info structure. With this change, the hierarchy of on-memory structures of nilfs will be simplified as follows: Before: super_block -> nilfs_sb_info -> the_nilfs -> cptree --+-> nilfs_root (current file system) +-> nilfs_root (snapshot A) +-> nilfs_root (snapshot B) : -> nilfs_sc_info (log writer structure) After: super_block -> the_nilfs -> cptree --+-> nilfs_root (current file system) +-> nilfs_root (snapshot A) +-> nilfs_root (snapshot B) : -> nilfs_sc_info (log writer structure) The reason why we didn't design so from the beginning is because the initial shape also differed from the above. The early hierachy was composed of "per-mount-point" super_block -> nilfs_sb_info pairs and a shared nilfs object. On the kernel 2.6.37, it was changed to the current shape in order to unify super block instances into one per device, and this cleanup became applicable as the result. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-08nd->inode is not set on the second attempt in path_walk()Al Viro1-0/+1
We leave it at whatever it had been pointing to after the first link_path_walk() had failed with -ESTALE. Things do not work well after that... Signed-off-by: Al Viro <[email protected]>
2011-03-09nilfs2: use sb instance instead of nilfs_sb_info structRyusuke Konishi7-145/+129
This replaces sbi uses with direct reference to sb instance. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-09nilfs2: get rid of sc_sbi back pointerRyusuke Konishi2-19/+12
Removes sci->sc_sbi which is a back pointer to nilfs_sb_info struct from log writer object (nilfs_sc_info). Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-09nilfs2: move log writer onto nilfs objectRyusuke Konishi3-39/+34
Log writer is held by the nilfs_sb_info structure. This moves it into nilfs object and replaces all uses of NILFS_SC() accessor. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-09nilfs2: move next generation counter into nilfs objectRyusuke Konishi5-19/+15
Moves s_next_generation counter and a spinlock protecting it to nilfs object from nilfs_sb_info structure. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-09nilfs2: move s_inode_lock and s_dirty_files into nilfs objectRyusuke Konishi6-61/+63
Moves s_inode_lock spinlock and s_dirty_files list to nilfs object from nilfs_sb_info structure. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-09nilfs2: move parameters on nilfs_sb_info into nilfs objectRyusuke Konishi4-16/+19
This moves four parameter variables on nilfs_sb_info s_resuid, s_resgid, s_interval and s_watermark to the nilfs object. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-09nilfs2: move mount options to nilfs objectRyusuke Konishi5-49/+54
This moves mount_opt local variable to nilfs object from nilfs_sb_info struct. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-08nfsd: wrong index used in inner looproel1-2/+2
Index i was already used in the outer loop Cc: [email protected] Signed-off-by: Roel Kluin <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2011-03-08nfsd4: fix struct file leakJ. Bruce Fields1-11/+21
Make sure we properly reference count the struct files that a lock depends on, and release them when the lock stateid is released. This fixes a major leak of struct files when using locking over nfsv4. Cc: [email protected] Reported-by: Rick Koshi <[email protected]> Tested-by: Ivo Přikryl <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2011-03-08nfsd4: minor nfs4state.c reshufflingJ. Bruce Fields1-64/+61
Minor cleanup in preparation for a bugfix--moving some code to avoid forward references, etc. No change in functionality. Cc: [email protected] Signed-off-by: J. Bruce Fields <[email protected]>
2011-03-08Btrfs: make sure not to return overlapping extents to fiemapChris Mason1-6/+27
The btrfs fiemap code was incorrectly returning duplicate or overlapping extents in some cases. cp was blindly trusting this result and we would end up with a destination file that was bigger than the original because some bytes were copied twice. The fix here adjusts our offsets to make sure we're always moving forward in the fiemap results. Signed-off-by: Chris Mason <[email protected]>
2011-03-08UBIFS: use max_write_size during recoveryArtem Bityutskiy1-13/+10
When recovering from unclean reboots UBIFS scans the journal and checks nodes. If a corrupted node is found, UBIFS tries to check if this is the last node in the LEB or not. This is is done by checking if there only 0xFF bytes starting from the next min. I/O unit. However, since now we write in c->max_write_size, we should actually check for 0xFFs starting from the next max. write unit. Signed-off-by: Artem Bityutskiy <[email protected]>
2011-03-08UBIFS: use max_write_size for write-buffersArtem Bityutskiy1-44/+137
Switch write-buffers from 'c->min_io_size' to 'c->max_write_size' which presumably has to be more write speed-efficient. However, when write-buffer is synchronized, write only the the min. I/O units which contain the data, do not write whole write-buffer. This is more space-efficient. Additionally, this patch takes into account that the LEB might not start from the max. write unit-aligned address. Signed-off-by: Artem Bityutskiy <[email protected]>
2011-03-08UBIFS: introduce write-buffer size fieldArtem Bityutskiy2-9/+21
Currently we assume write-buffer size is always min_io_size. But this is about to change and write-buffers may be of variable size. Namely, they will be of max_write_size at the beginning, but will get smaller when we are approaching the end of LEB. This is a preparation patch which introduces 'size' field in the write-buffer structure which carries the current write-buffer size. Signed-off-by: Artem Bityutskiy <[email protected]>
2011-03-08UBI: incorporate LEB offset informationArtem Bityutskiy2-0/+4
Incorporate the LEB offset information into UBIFS. We'll use this information in one of the next patches to figure out what are the max. write size offsets relative to the PEB. So this patch is just a preparation. Signed-off-by: Artem Bityutskiy <[email protected]>
2011-03-08UBIFS: incorporate maximum write sizeArtem Bityutskiy2-0/+24
Incorporate maximum write size into the UBIFS description data structure. This patch just introduces new 'c->max_write_size' and 'c->max_write_shift' fields as a preparation for the following patches. Signed-off-by: Artem Bityutskiy <[email protected]>
2011-03-08block: biovec_slab vs. CONFIG_BLK_DEV_INTEGRITYMartin K. Petersen1-3/+1
The block integrity subsystem no longer uses the bio_vec slabs so this code can safely be compiled in. Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2011-03-08unfuck proc_sysctl ->d_compare()Al Viro2-4/+11
a) struct inode is not going to be freed under ->d_compare(); however, the thing PROC_I(inode)->sysctl points to just might. Fortunately, it's enough to make freeing that sucker delayed, provided that we don't step on its ->unregistering, clear the pointer to it in PROC_I(inode) before dropping the reference and check if it's NULL in ->d_compare(). b) I'm not sure that we *can* walk into NULL inode here (we recheck dentry->seq between verifying that it's still hashed / fetching dentry->d_inode and passing it to ->d_compare() and there's no negative hashed dentries in /proc/sys/*), but if we can walk into that, we really should not have ->d_compare() return 0 on it! Said that, I really suspect that this check can be simply killed. Nick? Signed-off-by: Al Viro <[email protected]>
2011-03-08nilfs2: record used amount of each checkpoint in checkpoint listRyusuke Konishi6-19/+25
This records the number of used blocks per checkpoint in each checkpoint entry of cpfile. Even though userland tools can get the block count via nilfs_get_cpinfo ioctl, it was not updated by the nilfs2 kernel code. This fixes the issue and makes it available for userland tools to calculate used amount per checkpoint. Signed-off-by: Ryusuke Konishi <[email protected]> Cc: Jiro SEKIBA <[email protected]>
2011-03-08nilfs2: optimize rec_len functionsRyusuke Konishi1-0/+1
This is a similar change to those in ext2/ext3 codebase (commit 40a063f6691ce937 and a4ae3094869f18e2, respectively). The addition of 64k block capability in the rec_len_from_disk and rec_len_to_disk functions added a bit of math overhead which slows down file create workloads needlessly when the architecture cannot even support 64k blocks. This will cut the corner. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-08nilfs2: append blocksize info to warnings during loading super blocksRyusuke Konishi1-4/+7
At present, the same warning message can be output twice when nilfs detected a problem on super blocks: NILFS warning: broken superblock. using spare superblock. NILFS warning: broken superblock. using spare superblock. ... This is because these super blocks are reloaded with the block size written in a super block if it differs from the first block size, but this repetition looks somewhat confusing. So, we hint at what is going on by appending block size information to those messages. Reported-by: Wakko Warner <[email protected]> Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-08nilfs2: add compat ioctlRyusuke Konishi4-2/+24
The current FS_IOC_GETFLAGS/SETFLAGS/GETVERSION will fail if application is 32 bit and kernel is 64 bit. This issue is avoidable by adding compat_ioctl method. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-08nilfs2: implement FS_IOC_GETFLAGS/SETFLAGS/GETVERSIONRyusuke Konishi1-0/+70
Add support for the standard attributes set via chattr and read via lsattr. These attributes are already in the flags value in the nilfs2 inode, but currently we don't have any ioctl commands that expose them to the userland. Collaterally, this adds the FS_IOC_GETVERSION ioctl for getting i_generation, which allows users to list the file's generation number with "lsattr -v". Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-08nilfs2: tighten restrictions on inode flagsRyusuke Konishi2-5/+19
Nilfs has few rectrictions on which flags may be set on which inodes like ext2/3/4 filesystems used to be. Specifically DIRSYNC may only be set on directories and IMMUTABLE and APPEND may not be set on links. Tighten that to disallow TOPDIR being set on non-directories and only NODUMP and NOATIME to be set on non-regular file, non-directories. This introduces a flags masking function like those of extN and uses it during inode creation. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-08nilfs2: mark S_NOATIME on inodes only if NOATIME attribute is setRyusuke Konishi1-2/+0
At present, nilfs marks S_NOATIME flag on all inodes. This restricts nilfs_set_inode_flags function so that it marks S_NOATIME only if a given inode has an FS_NOATIME_FL flag. Although nilfs does not support atime yet, touch_atime() still safely returns on IS_NOATIME check since MS_NOATIME is always set on sb. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-08nilfs2: use common file attribute macrosRyusuke Konishi2-10/+7
Replaces uses of own inode flags (i.e. NILFS_SECRM_FL, NILFS_UNRM_FL, NILFS_COMPR_FL, and so forth) with common inode flags, and removes the own flag declarations. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-08nilfs2: add free entries count only if clear bit operation succeededRyusuke Konishi1-5/+7
Three functions of the current persistent object allocator, nilfs_palloc_commit_free_entry, nilfs_palloc_abort_alloc_entry, and nilfs_palloc_freev functions unconditionally add a counter after doing clear bit operation on a bitmap block. If the clear bit operation overlapped, the counter will not add up. This fixes the issue by making the counter operations conditional. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-08nilfs2: decrement inodes count only if raw inode was successfully deletedRyusuke Konishi1-2/+4
This fixes the issue that inodes count will not add up after removal of raw inodes fails. Hence, this prevents possible under flow of the inodes count. Signed-off-by: Ryusuke Konishi <[email protected]>
2011-03-08Merge branch 'master' of git://git.infradead.org/users/eparis/selinux into nextJames Morris33-82/+111
2011-03-08Merge branch 'master'; commit 'v2.6.38-rc7' into nextJames Morris497-15547/+24052
2011-03-07nfsd41: modify the members value of nfsd4_op_flagsMi Jinlong1-2/+2
The members of nfsd4_op_flags, (ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS) equals to ALLOWED_AS_FIRST_OP, maybe that's not what we want. OP_PUTROOTFH with op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS, can't appears as the first operation with out SEQUENCE ops. This patch modify the wrong value of ALLOWED_WITHOUT_FH etc which was introduced by f9bb94c4. Cc: [email protected] Reviewed-by: Benny Halevy <[email protected]> Signed-off-by: Mi Jinlong <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>