summaryrefslogtreecommitdiffstats
path: root/fs/jfs
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] capable/capability.h (fs/)Randy Dunlap2006-01-111-0/+1
| | | | | | | | | fs: Use <linux/capability.h> where capable() is used. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] remove jfs xattr permission checksChristoph Hellwig2006-01-101-42/+9
| | | | | | | | remove checks now in the VFS Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] move xattr permission checks into the VFSakpm@osdl.org2006-01-101-15/+0
| | | | | | | | | | | | | | | | | | | | ) From: Christoph Hellwig <hch@lst.de> The xattr code has rather complex permission checks because the rules are very different for different attribute namespaces. This patch moves as much as we can into the generic code. Currently all the major disk based filesystems duplicate these checks, while many minor filesystems or network filesystems lack some or all of them. To do this we need defines for the extended attribute names in common code, I moved them up from JFS which had the nicest defintions. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_semJes Sorensen2006-01-091-2/+2
| | | | | | | | | | | | | This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar <mingo@elte.hu> (finished the conversion) Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* [PATCH] Fix and add EXPORT_SYMBOL(filemap_write_and_wait)OGAWA Hirofumi2006-01-086-18/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add EXPORT_SYMBOL(filemap_write_and_wait) and use it. See mm/filemap.c: And changes the filemap_write_and_wait() and filemap_write_and_wait_range(). Current filemap_write_and_wait() doesn't wait if filemap_fdatawrite() returns error. However, even if filemap_fdatawrite() returned an error, it may have submitted the partially data pages to the device. (e.g. in the case of -ENOSPC) <quotation> Andrew Morton writes, If filemap_fdatawrite() returns an error, this might be due to some I/O problem: dead disk, unplugged cable, etc. Given the generally crappy quality of the kernel's handling of such exceptions, there's a good chance that the filemap_fdatawait() will get stuck in D state forever. </quotation> So, this patch doesn't wait if filemap_fdatawrite() returns the -EIO. Trond, could you please review the nfs part? Especially I'm not sure, nfs must use the "filemap_fdatawrite(inode->i_mapping) == 0", or not. Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* JFS: set i_ctime & i_mtime on target directory when creating linksDave Kleikamp2005-10-311-0/+3
| | | | | | | | | jfs has never been setting i_ctime or i_mtime when creating either hard or symbolic links. I'm surprised nobody had noticed until now. Thanks to Chris Spiegel for reporting the problem. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* [PATCH] mm: split page table lockHugh Dickins2005-10-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Christoph Lameter demonstrated very poor scalability on the SGI 512-way, with a many-threaded application which concurrently initializes different parts of a large anonymous area. This patch corrects that, by using a separate spinlock per page table page, to guard the page table entries in that page, instead of using the mm's single page_table_lock. (But even then, page_table_lock is still used to guard page table allocation, and anon_vma allocation.) In this implementation, the spinlock is tucked inside the struct page of the page table page: with a BUILD_BUG_ON in case it overflows - which it would in the case of 32-bit PA-RISC with spinlock debugging enabled. Splitting the lock is not quite for free: another cacheline access. Ideally, I suppose we would use split ptlock only for multi-threaded processes on multi-cpu machines; but deciding that dynamically would have its own costs. So for now enable it by config, at some number of cpus - since the Kconfig language doesn't support inequalities, let preprocessor compare that with NR_CPUS. But I don't think it's worth being user-configurable: for good testing of both split and unsplit configs, split now at 4 cpus, and perhaps change that to 8 later. There is a benefit even for singly threaded processes: kswapd can be attacking one part of the mm while another part is busy faulting. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2005-10-286-19/+38
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6
| * JFS: make sure right-most xtree pages have header.next set to zeroDave Kleikamp2005-10-281-9/+9
| | | | | | | | | | | | | | | | The xtTruncate code was only doing this for leaf pages. When a file is horribly fragmented, we may truncate a file leaving an internal page with an invalid head.next field, which may cause a stale page to be referenced. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| * JFS: Corrupted block map should not cause trapDave Kleikamp2005-10-111-5/+14
| | | | | | | | | | | | Replace assert statements with better error handling. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| * JFS: make special inodes play nicely with page balancingDave Kleikamp2005-10-035-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes up a few problems with jfs's reserved inodes. 1. There is no need for the jfs code setting the I_DIRTY bits in i_state. I am ashamed that the code ever did this, and surprised it hasn't been noticed until now. 2. Make sure special inodes are on an inode hash list. If the inodes are unhashed, __mark_inode_dirty will fail to put the inode on the superblock's dirty list, and the data will not be flushed under memory pressure. 3. Force writing journal data to disk when metapage_writepage is unable to write a metadata page due to pending journal I/O. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* | [PATCH] gfp_t: fs/*Al Viro2005-10-281-2/+2
|/ | | | | | | | | | | | | | | | | | | - ->releasepage() annotated (s/int/gfp_t), instances updated - missing gfp_t in fs/* added - fixed misannotation from the original sweep caught by bitwise checks: XFS used __nocast both for gfp_t and for flags used by XFS allocator. The latter left with unsigned int __nocast; we might want to add a different type for those but for now let's leave them alone. That, BTW, is a case when __nocast use had been actively confusing - it had been used in the same code for two different and similar types, with no way to catch misuses. Switch of gfp_t to bitwise had caught that immediately... One tricky bit is left alone to be dealt with later - mapping->flags is a mix of gfp_t and error indications. Left alone for now. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* JFS: don't dereference tlck->ip from txUpdateMapDave Kleikamp2005-09-202-1/+9
| | | | | | The inode pointer may no longer be valid Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: Fix sparse warnings, including endian errorDave Kleikamp2005-09-153-6/+5
| | | | | | | | | The fix in inode.c is a real bug. It could result in undeleted, yet unconnected files on big-endian hardware. The others are trivial. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* Merge branch 'for-linus' from kernel.org:/.../shaggy/jfs-2.6 manuallyLinus Torvalds2005-09-116-62/+193
|\ | | | | | | | | | | | | Clash due to new delete_inode behavior (the filesystem now needs to do the truncate_inode_pages() call itself). Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * JFS: Implement jfs_init_securityDave Kleikamp2005-09-013-0/+68
| | | | | | | | | | | | This atomically initializes the security xattr when an object is created Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| * JFS: allow extended attributes to be set within a existing transactionDave Kleikamp2005-09-015-49/+112
| | | | | | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| * JFS: jfs_delete_inode should always call clear_inode.Dave Kleikamp2005-08-301-12/+12
| | | | | | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* | [PATCH] update filesystems for new delete_inode behaviorMark Fasheh2005-09-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the file systems in fs/ implementing a delete_inode() callback to call truncate_inode_pages(). One implementation note: In developing this patch I put the calls to truncate_inode_pages() at the very top of those filesystems delete_inode() callbacks in order to retain the previous behavior. I'm guessing that some of those could probably be optimized. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> Acked-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] disk quotas fail when /etc/mtab is symlinked to /proc/mountsMark Bellon2005-09-072-3/+48
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If /etc/mtab is a regular file all of the mount options (of a file system) are written to /etc/mtab by the mount command. The quota tools look there for the quota strings for their operation. If, however, /etc/mtab is a symlink to /proc/mounts (a "good thing" in some environments) the tools don't write anything - they assume the kernel will take care of things. While the quota options are sent down to the kernel via the mount system call and the file system codes handle them properly unfortunately there is no code to echo the quota strings into /proc/mounts and the quota tools fail in the symlink case. The attached patchs modify the EXT[2|3] and JFS codes to add the necessary hooks. The show_options function of each file system in these patches currently deal with only those things that seemed related to quotas; especially in the EXT3 case more can be done (later?). Jan Kara also noted the difficulty in moving these changes above the FS codes responding similarly to myself to Andrew's comment about possible VFS migration. Issue summary: - FS codes have to process the entire string of options anyway. - Only FS codes that use quotas must have a show_options function (for quotas to work properly) however quotas are only used in a small number of FS. - Since most of the quota using FS support other options these FS codes should have the a show_options function to show those options - and the quota echoing becomes virtually negligible. Based on feedback I have modified my patches from the original: JFS a missing patch has been restored to the posting EXT[2|3] and JFS always use the show_options function - Each FS has at least one FS specific option displayed - QUOTA output is under a CONFIG_QUOTA ifdef - a follow-on patch will add a multitude of options for each FS EXT[2|3] and JFS "quota" is treated as "usrquota" EXT3 journalled data check for journalled quota removed EXT[2|3] mount when quota specified but not compiled in - no changes from my original patch. I tested the patch and the codes warn but - still mount. With all due respection I believe the comments otherwise were a - misread of the patch. Please reread/test and comment. XFS patch removed - the XFS team already made the necessary changes EXT3 mixing old and new quotas are handled differently (not purely exclusive) - if old and new quotas for the same type are used together the old type is silently depricated for compatability (e.g. usrquota and usrjquota) - mixing of old and new quotas is an error (e.g. usrjquota and grpquota) Signed-off-by: Mark Bellon <mbellon@mvista.com> Acked-by: Dave Kleikamp <shaggy@austin.ibm.com> Cc: Jan Kara <jack@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge refs/heads/for-linus from ↵Linus Torvalds2005-08-301-3/+2
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6.git
| * Merge with /home/shaggy/git/linus-clean/Dave Kleikamp2005-08-195-24/+34
| |\
| * | JFS: Initialize dentry->d_op for negative dentries tooDave Kleikamp2005-08-171-3/+2
| | | | | | | | | | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* | | [PATCH] Fix up symlink function pointersAl Viro2005-08-191-2/+2
| |/ |/| | | | | | | | | | | | | | | | | This fixes up the symlink functions for the calling convention change: * afs, autofs4, befs, devfs, freevxfs, jffs2, jfs, ncpfs, procfs, smbfs, sysvfs, ufs, xfs - prototype change for ->follow_link() * befs, smbfs, xfs - same for ->put_link() Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | JFS: Fix race in txLockDave Kleikamp2005-08-102-0/+4
| | | | | | | | | | | | | | | | TxAnchor.anon_list is protected by jfsTxnLock (TXN_LOCK), but there was a place in txLock() that was removing an entry from the list without holding the spinlock. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* | JFS: Check for invalid inodes in jfs_delete_inodeDave Kleikamp2005-08-011-0/+4
| | | | | | | | | | | | | | Some error paths may iput an invalid inode with i_nlink=0. jfs should not try to actually delete such an inode. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* | JFS: Improve sync barrier processingDave Kleikamp2005-07-274-24/+26
|/ | | | | | | | | | | | | | Under heavy load, hot metadata pages are often locked by non-committed transactions, making them difficult to flush to disk. This prevents the sync point from advancing past a transaction that had modified the page. There is a point during the sync barrier processing where all outstanding transactions have been committed to disk, but no new transaction have been allowed to proceed. This is the best time to write the metadata. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: Fix i_blocks accounting when allocation failsDave Kleikamp2005-07-261-4/+9
| | | | | | | A failure in dbAlloc caused a directory's i_blocks to be incorrectly incremented, causing jfs_fsck to find the inode to be corrupt. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: Don't set log_SYNCBARRIER when log->active == 0Dave Kleikamp2005-07-251-1/+2
| | | | | | | | | | If a metadata page is kept active, it is possible that the sync barrier logic continues to trigger, even if all active transactions have been phyically written to the journal. This can cause a hang, since the completion of the journal I/O is what unsets the sync barrier flag to allow new transactions to be created. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: Fix typo in last patchDave Kleikamp2005-07-221-1/+1
| | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: fsync wrong behavior when I/O failure occursQu Fuping2005-07-151-1/+1
| | | | | | | | | | | | | | | | This is half of a patch that Qu Fuping submitted in April. The first part was applied to fs/mpage.c in 2.6.12-rc4. jfs_fsync should return error, but it doesn't wait for the metadata page to be uptodate, e.g.: jfs_fsync->jfs_commit_inode->txCommit->diWrite->read_metapage-> __get_metapage->read_cache_page reads a page from disk. Because read is async, when read_cache_page: err = filler(data, page), filler will not return error, it just submits I/O request and returns. So, page is not uptodate. Checking only if(IS_ERROR(mp->page)) is not enough, we should add "|| !PageUptodate(mp->page)" Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: Remove assert statement in dbJoin & return -EIO insteadDave Kleikamp2005-07-151-16/+30
| | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: Remove bogus WARN_ON statement and some dead codeDave Kleikamp2005-07-141-9/+0
| | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: Need to be root to create files with security contextIan Dall2005-07-131-2/+2
| | | | | | It turns out this is due to some inverted logic in xattr.c Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: Allow security.* xattrs to be set on symlinksDave Kleikamp2005-07-131-1/+1
| | | | | | | | | All of the different xattr namespaces have different rules. user.* and ACL's are not allowed on symlinks, and since these were the first xattrs implemented, I assumed there was no need to support xattrs on symlinks. This one-line patch should fix it. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* Merge with /home/shaggy/git/linus-clean/Dave Kleikamp2005-07-132-6/+6
|\ | | | | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| * [PATCH] Cleanup patch for process freezingChristoph Lameter2005-06-252-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Establish a simple API for process freezing defined in linux/include/sched.h: frozen(process) Check for frozen process freezing(process) Check if a process is being frozen freeze(process) Tell a process to freeze (go to refrigerator) thaw_process(process) Restart process frozen_process(process) Process is frozen now 2. Remove all references to PF_FREEZE and PF_FROZEN from all kernel sources except sched.h 3. Fix numerous locations where try_to_freeze is manually done by a driver 4. Remove the argument that is no longer necessary from two function calls. 5. Some whitespace cleanup 6. Clear potential race in refrigerator (provides an open window of PF_FREEZE cleared before setting PF_FROZEN, recalc_sigpending does not check PF_FROZEN). This patch does not address the problem of freeze_processes() violating the rule that a task may only modify its own flags by setting PF_FREEZE. This is not clean in an SMP environment. freeze(process) is therefore not SMP safe! Signed-off-by: Christoph Lameter <christoph@lameter.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | JFS: Code cleanup - getting rid of never-used debug codeDave Kleikamp2005-06-276-947/+8
| | | | | | | | | | | | | | | | | | | | | | I'm finally getting around to cleaning out debug code that I've never used. There has always been code ifdef'ed out by _JFS_DEBUG_DMAP, _JFS_DEBUG_IMAP, _JFS_DEBUG_DTREE, and _JFS_DEBUG_XTREE, which I have personally never used, and I doubt that anyone has since the design stage back in OS/2. There is also a function, xtGather, that has never been used, and I don't know why it was ever there. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* | JFS: performance patchSonny Rao2005-06-231-3/+4
|/ | | | | | | | | | Basically, we saw a large amount of time spent in the jfs_strfromUCS_le() function, mispredicting the branch inside the loop, so I just added some unlikely modifiers to the if statements to re-ordered the code. Again, these simple changes provided > 2 % on spec-sfs, so please consider it for inclusion. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* [PATCH] remove <linux/xattr_acl.h>Christoph Hellwig2005-06-234-10/+11
| | | | | | | | | This file duplicates <linux/posix_acl_xattr.h>, using slightly different names. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* JFS: Fix compiler warning in jfs_logmgr.cDave Kleikamp2005-06-031-2/+3
| | | | | | | | | | | fs/jfs/jfs_logmgr.c: In function `jfs_flush_journal': fs/jfs/jfs_logmgr.c:1632: warning: unused variable `mp' Some debug code in jfs_flush_journal does nothing when CONFIG_JFS_DEBUG is not defined. Place the whole code segment within an ifdef to avoid unnecessary code to be compiled and the warning to be issued. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: kernel BUG at fs/jfs/jfs_txnmgr.c:859Dave Kleikamp2005-06-021-0/+3
| | | | | | | add_missing_indices() must set tlck->type to tlckBTROOT when modifying a root btree root to avoid a trap in txRelease() Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: Remove redundant kfree() NULL pointer checksJesper Juhl2005-05-092-8/+4
| | | | | | | kfree() can handle a NULL pointer, don't worry about passing it one. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: Fix sparse warningDave Kleikamp2005-05-041-1/+1
| | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: cleanup - remove unneeded sanity checkDave Kleikamp2005-05-041-9/+0
| | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: fix sparse warnings by moving extern declarations to headersDave Kleikamp2005-05-0418-181/+89
| | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* JFS: Endian errorsDave Kleikamp2005-05-041-3/+3
| | | | | | Thanks sparse! Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
* [PATCH] JFS: Don't allocate extents that overlap existing extentsDave Kleikamp2005-05-023-25/+46
| | | | | | | | | Modify xtSearch so that it returns the next allocated block when the requested block is unmapped. This can be used to make sure we don't create a new extent that overlaps the next one. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] JFS: Write journal sync points more oftenDave Kleikamp2005-05-024-9/+27
| | | | | | | | | | | | | | This patch adds jfs_syncpt, which calls lmLogSync to write sync points to the journal both in jfs_sync_fs and when sync barrier processing completes. lmLogSync accomplishes two things: 1) it pushes logged-but-dirty metadata pages to disk, and 2) it writes a sync record to the journal so that jfs_fsck doesn't need to replay more transactions than is necessary. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] JFS: Support page sizes greater than 4KDave Kleikamp2005-05-0213-462/+806
| | | | | | | jfs has never worked on architecutures where the page size was not 4K. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
OpenPOWER on IntegriCloud