aboutsummaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)AuthorFilesLines
2010-05-24xfs: make the log ticket ID available outside the log infrastructureDave Chinner4-3/+12
The ticket ID is needed to uniquely identify transactions when doing busy extent matching. Delayed logging changes the lifecycle of busy extents with respect to the transaction structure lifecycle. Hence we can no longer use the transaction structure as a means of determining the owner of the busy extent as it may be freed and reused while the busy extent is still active. This commit provides the infrastructure to access the xlog_tid_t held in the ticket from a transaction handle. This avoids the need for callers to peek into the transaction and log structures to find this out. Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Alex Elder <[email protected]>
2010-05-24xfs: clean up log ticket overrun debug outputDave Chinner2-15/+6
Push the error message output when a ticket overrun is detected into the ticket printing functions. Also remove the debug version of the code as the production version will still panic just as effectively on a debug kernel via the panic mask being set. Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Alex Elder <[email protected]>
2010-05-24xfs: Clean up XFS_BLI_* flag namespaceDave Chinner7-70/+70
Clean up the buffer log format (XFS_BLI_*) flags because they have a polluted namespace. They XFS_BLI_ prefix is used for both in-memory and on-disk flag feilds, but have overlapping values for different flags. Rename the buffer log format flags to use the XFS_BLF_* prefix to avoid confusing them with the in-memory XFS_BLI_* prefixed flags. Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Alex Elder <[email protected]>
2010-05-24xfs: modify buffer item reference countingDave Chinner1-60/+50
The buffer log item reference counts used to take referenceѕ for every transaction, similar to the pin counting. This is symmetric (like the pin/unpin) with respect to transaction completion, but with dleayed logging becomes assymetric as the pinning becomes assymetric w.r.t. transaction completion. To make both cases the same, allow the buffer pinning to take a reference to the buffer log item and always drop the reference the transaction has on it when being unlocked. This is balanced correctly because the unpin operation always drops a reference to the log item. Hence reference counting becomes symmetric w.r.t. item pinning as well as w.r.t active transactions and as a result the reference counting model remain consistent between normal and delayed logging. Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Alex Elder <[email protected]>
2010-05-24xfs: allow log ticket allocation to take allocation flagsDave Chinner1-8/+8
Delayed logging currently requires ticket allocation to succeed, so we need to be able to sleep on allocation. It also should not allow memory allocation to recurse into the filesystem. hence we need to pass allocation flags directing the type of allocation the caller requires. Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Alex Elder <[email protected]>
2010-05-24xfs: Don't reuse the same transaction ID for duplicated transactions.Dave Chinner1-0/+9
The transaction ID is written into the log as the unique identifier for transactions during recover. When duplicating a transaction, we reuse the log ticket, which means it has the same transaction ID as the previous transaction. Rather than regenerating a random transaction ID for the duplicated transaction, just add one to the current ID so that duplicated transaction can be easily spotted in the log and during recovery during problem diagnosis. Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Alex Elder <[email protected]>
2010-05-24Merge branch 'bkl/ioctl' of ↵Linus Torvalds14-69/+100
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing * 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing: uml: Pushdown the bkl from harddog_kern ioctl sunrpc: Pushdown the bkl from sunrpc cache ioctl sunrpc: Pushdown the bkl from ioctl autofs4: Pushdown the bkl from ioctl uml: Convert to unlocked_ioctls to remove implicit BKL ncpfs: BKL ioctl pushdown coda: Clean-up whitespace problems in pioctl.c coda: BKL ioctl pushdown drivers: Push down BKL into various drivers isdn: Push down BKL into ioctl functions scsi: Push down BKL into ioctl functions dvb: Push down BKL into ioctl functions smbfs: Push down BKL into ioctl function coda/psdev: Remove BKL from ioctl function um/mmapper: Remove BKL usage sn_hwperf: Kill BKL usage hfsplus: Push down BKL into ioctl function
2010-05-24Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osdLinus Torvalds2-1/+31
* 'for-linus' of git://git.open-osd.org/linux-open-osd: exofs: confusion between kmap() and kmap_atomic() api exofs: Add default address_space_operations
2010-05-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6Linus Torvalds4-25/+32
* git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6: fat: convert to unlocked_ioctl fat: Cleanup nls_unload() usage fat: use pack_hex_byte() instead of custom one
2010-05-24Merge branch 'for-linus' of ↵Linus Torvalds5-30/+153
git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: 9p: Optimize TCREATE by eliminating a redundant fid clone. 9p: cleanup: remove unneeded assignment 9p: Add mksock support fs/9p: Make sure we properly instantiate dentry. 9p: add 9P2000.L rename operation 9p: add 9P2000.L statfs operation 9p: VFS switches for 9p2000.L: VFS switches 9p: VFS switches for 9p2000.L: protocol and client changes
2010-05-24Merge branch 'for-linus' of ↵Linus Torvalds30-759/+876
git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (59 commits) ceph: reuse mon subscribe message instead of allocated anew ceph: avoid resending queued message to monitor ceph: Storage class should be before const qualifier ceph: all allocation functions should get gfp_mask ceph: specify max_bytes on readdir replies ceph: cleanup pool op strings ceph: Use kzalloc ceph: use common helper for aborted dir request invalidation ceph: cope with out of order (unsafe after safe) mds reply ceph: save peer feature bits in connection structure ceph: resync headers with userland ceph: use ceph. prefix for virtual xattrs ceph: throw out dirty caps metadata, data on session teardown ceph: attempt mds reconnect if mds closes our session ceph: clean up send_mds_reconnect interface ceph: wait for mds OPEN reply to indicate reconnect success ceph: only send cap releases when mds is OPEN|HUNG ceph: dicard cap releases on mds restart ceph: make mon client statfs handling more generic ceph: drop src address(es) from message header [new protocol feature] ...
2010-05-24GFS2: Fix permissions checking for setflags ioctl()Steven Whitehouse1-0/+7
We should be checking for the ownership of the file for which flags are being set, rather than just for write access. Reported-by: Dan Rosenberg <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2010-05-24ufs: Remove dead quota codeJan Kara7-195/+1
UFS quota is non-functional at least since 2.6.12 because dq_op was set to NULL. Since the filesystem exists mainly to allow cooperation with Solaris and quota format isn't standard, just remove the dead code. CC: Evgeniy Dushistov <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2010-05-24udf: Remove dead quota codeJan Kara7-128/+6
Quota on UDF is non-functional at least since 2.6.16 (I'm too lazy to do more archeology) because it does not provide .quota_write and .quota_read functions and thus quotaon(8) just returns EINVAL. Since nobody complained for all those years and quota support is not even in UDF standard just nuke it. Signed-off-by: Jan Kara <[email protected]>
2010-05-24quota: rename default quotactl methods to dquot_Christoph Hellwig9-75/+75
Follow the dquot_* style used elsewhere in dquot.c. [Jan Kara: Fixed up missing conversion of ext2] Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2010-05-24quota: explicitly set ->dq_op and ->s_qcopChristoph Hellwig6-6/+22
Only set the quota operation vectors if the filesystem actually supports quota instead of doing it for all filesystems in alloc_super(). [Jan Kara: Export dquot_operations and vfs_quotactl_ops] Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2010-05-24quota: drop remount argument to ->quota_on and ->quota_offChristoph Hellwig6-34/+16
Remount handling has fully moved into the filesystem, so all this is superflous now. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2010-05-24quota: move unmount handling into the filesystemChristoph Hellwig8-1/+14
Currently the VFS calls into the quotactl interface for unmounting filesystems. This means filesystems with their own quota handling can't easily distinguish between user-space originating quotaoff and an unount. Instead move the responsibily of the unmount handling into the filesystem to be consistent with all other dquot handling. Note that we do call dquot_disable a lot later now, e.g. after a sync_filesystem. But this is fine as the quota code does all its writes via blockdev's mapping and that is synced even later. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2010-05-24quota: kill the vfs_dq_off and vfs_dq_quota_on_remount wrappersChristoph Hellwig9-83/+61
Instead of having wrappers in the VFS namespace export the dquot_suspend and dquot_resume helpers directly. Also rename vfs_quota_disable to dquot_disable while we're at it. [Jan Kara: Moved dquot_suspend to quotaops.h and made it inline] Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2010-05-24quota: move remount handling into the filesystemChristoph Hellwig8-14/+84
Currently do_remount_sb calls into the dquot code to tell it about going from rw to ro and ro to rw. Move this code into the filesystem to not depend on the dquot code in the VFS - note ocfs2 already ignores these calls and handles remount by itself. This gets rid of overloading the quotactl calls and allows to unify the VFS and XFS codepaths in that area later. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2010-05-24ocfs2: Fix use after free on remount read-onlyJan Kara1-1/+7
We also have to cancel quota syncing thread on remount read only because at that moment quota is being turned off. Otherwise quota syncing thread will try to access already freed quota structures. Signed-off-by: Jan Kara <[email protected]>
2010-05-23squashfs: fix name reading in squashfs_xattr_getPhillip Lougher1-2/+6
Only read potentially matching names into the target buffer, all obviously non matching names don't need to be read into the target buffer. Signed-off-by: Phillip Lougher <[email protected]>
2010-05-23squashfs: constify xattr handlersPhillip Lougher2-8/+8
Signed-off-by: Phillip Lougher <[email protected]>
2010-05-229p: Optimize TCREATE by eliminating a redundant fid clone.Venkateswararao Jujjuri1-12/+6
This patch removes a redundant fid clone on the directory fid and hence reduces a server transaction while creating new filesystem object. Signed-off-by: Venkateswararao Jujjuri <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
2010-05-229p: cleanup: remove unneeded assignmentDan Carpenter1-2/+0
We never use "v9ses" and so we can remove it. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
2010-05-229p: Add mksock supportVenkateswararao Jujjuri1-0/+2
Without this patch, an attempt to mksock will get an EINVAL. Before this patch: [root@localhost 1dir]# mksock mysock mksock: error making mysock: Invalid argument With this patch: [root@localhost 1dir]# mksock mysock [root@localhost 1dir]# ls -l mysock s--------- 1 root root 0 2010-03-31 17:44 mysock Signed-off-by: Venkateswararao Jujjuri <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
2010-05-22fs/9p: Make sure we properly instantiate dentry.Aneesh Kumar K.V1-3/+4
For lookup if we get ENOENT error from the server we still instantiate the dentry. We need to make sure we have dentry operations set in that case so that a later dput on the dentry does the expected. Without the patch we get the below error #ln -sf abc abclink ln: creating symbolic link `abclink': No such file or directory Now on the host do $ touch abclink Guest now gives ENOENT error. # ls ls: cannot access abclink: No such file or directory Debugged-by:Gautham R Shenoy <[email protected]> Signed-off-by: Aneesh Kumar K.V <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
2010-05-22autofs4: Pushdown the bkl from ioctlFrederic Weisbecker1-4/+18
Pushdown the bkl to autofs4_root_ioctl. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Ian Kent <[email protected]> Cc: Autofs <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: John Kacur <[email protected]> Cc: Arnd Bergmann <[email protected]>
2010-05-21Merge branch 'for-linus' of ↵Linus Torvalds105-1170/+849
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: (69 commits) fix handling of offsets in cris eeprom.c, get rid of fake on-stack files get rid of home-grown mutex in cris eeprom.c switch ecryptfs_write() to struct inode *, kill on-stack fake files switch ecryptfs_get_locked_page() to struct inode * simplify access to ecryptfs inodes in ->readpage() and friends AFS: Don't put struct file on the stack Ban ecryptfs over ecryptfs logfs: replace inode uid,gid,mode initialization with helper function ufs: replace inode uid,gid,mode initialization with helper function udf: replace inode uid,gid,mode init with helper ubifs: replace inode uid,gid,mode initialization with helper function sysv: replace inode uid,gid,mode initialization with helper function reiserfs: replace inode uid,gid,mode initialization with helper function ramfs: replace inode uid,gid,mode initialization with helper function omfs: replace inode uid,gid,mode initialization with helper function bfs: replace inode uid,gid,mode initialization with helper function ocfs2: replace inode uid,gid,mode initialization with helper function nilfs2: replace inode uid,gid,mode initialization with helper function minix: replace inode uid,gid,mode init with helper ext4: replace inode uid,gid,mode init with helper ... Trivial conflict in fs/fs-writeback.c (mark bitfields unsigned)
2010-05-21ceph: reuse mon subscribe message instead of allocated anewSage Weil2-10/+14
Use the same message, allocated during startup. No need to reallocate a new one each time around (and potentially ENOMEM). Signed-off-by: Sage Weil <[email protected]>
2010-05-21switch ecryptfs_write() to struct inode *, kill on-stack fake filesAl Viro3-45/+11
Signed-off-by: Al Viro <[email protected]>
2010-05-21switch ecryptfs_get_locked_page() to struct inode *Al Viro3-15/+7
Signed-off-by: Al Viro <[email protected]>
2010-05-21simplify access to ecryptfs inodes in ->readpage() and friendsAl Viro1-4/+3
we can get to them from page->mapping->host, no need to mess with file. Signed-off-by: Al Viro <[email protected]>
2010-05-21AFS: Don't put struct file on the stackAl Viro4-36/+41
Don't put struct file on the stack as it takes up quite a lot of space and violates lifetime rules for struct file. Rather than calling afs_readpage() indirectly from the directory routines by way of read_mapping_page(), split afs_readpage() to have afs_page_filler() that's given a key instead of a file and call read_cache_page(), specifying the new function directly. Use it in afs_readpages() as well. Also make use of this in afs_mntpt_check_symlink() too for the same reason. Reported-by: Al Viro <[email protected]> Signed-off-by: Al Viro <[email protected]> Signed-off-by: David Howells <[email protected]>
2010-05-21Ban ecryptfs over ecryptfsAl Viro1-0/+8
This is a seriously simplified patch from Eric Sandeen; copy of rationale follows: === mounting stacked ecryptfs on ecryptfs has been shown to lead to bugs in testing. For crypto info in xattr, there is no mechanism for handling this at all, and for normal file headers, we run into other trouble: BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 IP: [<ffffffffa015b0b3>] ecryptfs_d_revalidate+0x43/0xa0 [ecryptfs] ... There doesn't seem to be any good usecase for this, so I'd suggest just disallowing the configuration. Based on a patch originally, I believe, from Mike Halcrow. === Signed-off-by: Al Viro <[email protected]>
2010-05-21logfs: replace inode uid,gid,mode initialization with helper functionAl Viro1-8/+1
Signed-off-by: Al Viro <[email protected]>
2010-05-21ufs: replace inode uid,gid,mode initialization with helper functionDmitry Monakhov1-9/+1
Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21udf: replace inode uid,gid,mode init with helperDmitry Monakhov2-17/+4
Acked-by: Jan Kara <[email protected]> Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21ubifs: replace inode uid,gid,mode initialization with helper functionDmitry Monakhov1-8/+1
Acked-by: Artem Bityutskiy <[email protected]> Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21sysv: replace inode uid,gid,mode initialization with helper functionDmitry Monakhov1-10/+1
Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21reiserfs: replace inode uid,gid,mode initialization with helper functionDmitry Monakhov1-14/+4
Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21ramfs: replace inode uid,gid,mode initialization with helper functionDmitry Monakhov1-14/+6
- seems what ramfs_get_inode is only locally, make it static. [AV: the hell it is; it's used by shmem, so shmem needed conversion too and no, that function can't be made static] Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21omfs: replace inode uid,gid,mode initialization with helper functionDmitry Monakhov1-3/+1
Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21bfs: replace inode uid,gid,mode initialization with helper functionDmitry Monakhov1-3/+1
Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21ocfs2: replace inode uid,gid,mode initialization with helper functionDmitry Monakhov1-8/+1
Acked-by: Joel Becker <[email protected]> Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21nilfs2: replace inode uid,gid,mode initialization with helper functionDmitry Monakhov1-10/+1
Acked-by: Ryusuke Konishi <[email protected]> Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21minix: replace inode uid,gid,mode init with helperDmitry Monakhov3-12/+6
- also redesign minix_new_inode interface Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21ext4: replace inode uid,gid,mode init with helperDmitry Monakhov1-8/+4
Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21ext3: replace inode uid,gid,mode init with helperDmitry Monakhov1-8/+5
Acked-by: Jan Kara <[email protected]> Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-05-21ext2: replace inode uid,gid,mode init with helperDmitry Monakhov1-8/+4
Acked-by: Jan Kara <[email protected]> Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Al Viro <[email protected]>