Commit Graph

264 Commits

Author SHA1 Message Date
Randy.Dunlap c59ede7b78 [PATCH] move capable() to capability.h
- Move capable() from sched.h to capability.h;

- Use <linux/capability.h> where capable() is used
	(in include/, block/, ipc/, kernel/, a few drivers/,
	mm/, security/, & sound/;
	many more drivers/ to go)

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-11 18:42:13 -08:00
Nathan Scott ddae9c2ea7 Merge HEAD from oss.sgi.com:/oss/git/linux-2.6.git 2006-01-12 13:34:47 +11:00
Nathan Scott 0d1335b310 [XFS] Fix follow_link when dealing with symlinks larger than 256 bytes.
Thanks to Yamamoto Takashi.

SGI-PV: 947953
SGI-Modid: xfs-linux-melb:xfs-kern:24962a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-12 10:32:51 +11:00
Nathan Scott 3762ec6bf7 [XFS] Merge in trivial changes, sync up headers with userspace
equivalents.

SGI-PV: 907752
SGI-Modid: xfs-linux-melb:xfs-kern:24961a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-12 10:29:53 +11:00
Nathan Scott 6ab65429b4 [XFS] Fix compiler warnings from older gcc versions wrt printfalike
arguments.

SGI-PV: 907752
SGI-Modid: xfs-linux-melb:xfs-kern:24901a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 21:03:28 +11:00
Nathan Scott ca5ccbf98d [XFS] Fix some build fallout from atime changes.
SGI-PV: 946679
SGI-Modid: xfs-linux-melb:xfs-kern:24899a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 21:03:04 +11:00
Tim Shimmin 1259845d3f [XFS] remove XFS_LOG_RES_DEBUG and turn on the res history all the time to
get more useful error info on space for trans items

SGI-PV: 947110
SGI-Modid: xfs-linux-melb:xfs-kern:24886a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 21:02:47 +11:00
Yingping Lu 71df099dc3 [XFS] xfssyncd is responsible for flushing inode or device's data by
extracting the work from its queue. In addition, this processing also
decrement the inode's i_count. If there are any remaining works in queue
before this process terminates, we have unbalanced increment and decrement
of i_count. Thus it can cause assertion failure of vn_count. The fix
allows xyssyncd to process any remaining work before it is shutdown. 

SGI-PV: 945935
SGI-Modid: xfs-linux-melb:xfs-kern:203970a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 21:02:29 +11:00
Christoph Hellwig 75e17b3caf [XFS] add helper to get xfs_inode from vnode
SGI-PV: 947206
SGI-Modid: xfs-linux-melb:xfs-kern:203960a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:58:44 +11:00
Nathan Scott 204ab25f36 [XFS] Fix up offset type inconsistencies and gcc warnings from earlier
changes.

SGI-PV: 947038
SGI-Modid: xfs-linux-melb:xfs-kern:24875a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:50:22 +11:00
Christoph Hellwig da7f93e9ee [XFS] fix up per-device xfsbufd
SGI-PV: 947098
SGI-Modid: xfs-linux-melb:xfs-kern:203831a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:49:57 +11:00
Christoph Hellwig f5e596bbef [XFS] fix writeback control handling fix a reversed condition on where to
trylock and deal with block layer congestion properly.	Patch from David
Chinner and Christoph Hellwig.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203830a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:49:42 +11:00
Christoph Hellwig 6c4fe19f66 [XFS] cluster rewrites We can cluster mapped pages aswell, this improves
performances on rewrites since we can reduce the number of allocator
calls.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203829a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:49:28 +11:00
Christoph Hellwig 7336cea8c2 [XFS] pass full 64bit offsets to xfs_add_to_ioend
SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203828a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:49:16 +11:00
Christoph Hellwig d5cb48aaac [XFS] consolidate some code in xfs_page_state_convert The unmapped buffer
case is very similar to delayed and unwritten extends. Reorganize the code
to share some code for these cases.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203827a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:49:02 +11:00
Christoph Hellwig 9260dc6b2e [XFS] various fixes for xfs_convert_page fix various bogusities in
handling offets  From David Chinner and Christoph Hellwig

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203826a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:48:47 +11:00
Christoph Hellwig 1defeac9d4 [XFS] clean up the xfs_offset_to_map interface Currently we pass a struct
page and a relative offset into that page around, and returns the current
xfs_iomap_t if the block at the specified offset fits into it, or a NULL
pointer otherwise.  This patch passed the full 64bit offset into the inode
that all callers have anyway, and changes the return value to a simple
boolean.  Also the function gets a more descriptive name: xfs_iomap_valid.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203825a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:48:33 +11:00
Christoph Hellwig 10ce444428 [XFS] use pagevec lookups This reduces the time spend in the radix tree
lookups and avoids unessecary look roundtrips.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203823a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:48:14 +11:00
Christoph Hellwig f6d6d4fcd1 [XFS] Initial pass at going directly-to-bio on the buffered IO path. This
allows us to submit much larger I/Os instead of sending down lots of small
buffer_heads.  To do this we need to have a rather complicated I/O
submission and completion tracking infrastructure.  Part of the latter has
been merged already a long time ago for direct I/O support. Part of the
problem is that we need to track sub-pagesize regions and for that we
still need buffer_heads for the time beeing.  Long-term I hope we can move
to better data strucutures and/or maybe move this to fs/mpage.c instead of
having it in XFS.  Original patch from Nathan Scott with various updates
from David Chinner and Christoph Hellwig.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203822a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:40:13 +11:00
Nathan Scott ce8e922c0e [XFS] Complete the pagebuf -> xfs_buf naming convention transition,
finally.

SGI-PV: 947038
SGI-Modid: xfs-linux-melb:xfs-kern:24866a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:39:08 +11:00
Yingping Lu 68bdb6eabc [XFS] Fixed delayed_blks assert failure during umount. The delayed_blks
was caused by ENOSPC but not Rreclaimed by xfs_release or xfs_inactive.
The fix changed the condition in xfs_release and xfs_inactive to invoke
xfs_inactive_free_eofblocks for this special case, changed
xfs_inactive_free_eofblocks to clean the delayed blks after eof. It also
changed xfs_write to set correct eof when ENOSPC occurs.

SGI-PV: 946267
SGI-Modid: xfs-linux-melb:xfs-kern:203788a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:38:31 +11:00
David Chinner a6867a6815 [XFS] Introduce per-filesystem delwri pagebuf flushing to reduce
contention between filesystems and prevent deadlocks between filesystems
when a flush dependency exists between them.

SGI-PV: 947098
SGI-Modid: xfs-linux-melb:xfs-kern:24844a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:37:58 +11:00
Tim Shimmin 216d3b2acb [XFS] take out the call to vn_mark_bad() used when acl inherit fails and
it needs to back out the inode creation. Tested by xfs_tests/077.

SGI-PV: 930841
SGI-Modid: xfs-linux-melb:xfs-kern:24842a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:37:38 +11:00
Christoph Hellwig 794fe2dc65 [XFS] endianess annotations and tidying for the uuid code
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:203709a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:37:17 +11:00
Nathan Scott 60a204f096 [XFS] Fix a thinko when generating a forced shutdown stack trace.
SGI-PV: 929558
SGI-Modid: xfs-linux-melb:xfs-kern:203817a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:37:00 +11:00
Ryan Hankins 0733af213f [XFS] Add a stack trace in the case of xfs_forced_shutdown.
SGI-PV: 929558
SGI-Modid: xfs-linux-melb:xfs-kern:203701a

Signed-off-by: Ryan Hankins <hankins@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:36:44 +11:00
Nathan Scott 77a7cce425 [XFS] Fix quotaoff logitem for project quota, affects log recovery only.
SGI-PV: 946444
SGI-Modid: xfs-linux-melb:xfs-kern:24768a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:35:57 +11:00
Nathan Scott 446ada4a03 [XFS] Add an XFS callout to security_inode_init_security; SE Linux is not
functional with XFS without this change.

SGI-PV: 946762
SGI-Modid: xfs-linux-melb:xfs-kern:24766a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:35:44 +11:00
Nathan Scott c2cd255060 [XFS] Fix v2 log bufsize reporting in /proc/mounts.
SGI-PV: 946760
SGI-Modid: xfs-linux-melb:xfs-kern:24765a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:35:32 +11:00
Christoph Hellwig 42fe2b1f7f [XFS] fix, speedup and simplify atime handling let the VFS handle atime
updates and only sync back to the xfs inode when nessecary

SGI-PV: 946679
SGI-Modid: xfs-linux-melb:xfs-kern:203362a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:35:17 +11:00
Christoph Hellwig dd954c69d1 [XFS] turn xlog helper macros into real functions
SGI-PV: 946205
SGI-Modid: xfs-linux-melb:xfs-kern:203360a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:34:50 +11:00
Eric Sandeen 24ee80882d [XFS] remove unused vars, args, & unneeded intermediate vars from zeroing
code

SGI-PV: 946641
SGI-Modid: xfs-linux-melb:xfs-kern:203328a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:34:32 +11:00
Eric Sandeen 65be605419 [XFS] remove unused "readonly" arg from xlog_find_tail and xlog_recover
SGI-PV: 946611
SGI-Modid: xfs-linux-melb:xfs-kern:203307a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:34:19 +11:00
Nathan Scott 0d14824c07 [XFS] Ensure max diosize reported is aligned with minimum diosize.
SGI-PV: 910890
SGI-Modid: xfs-linux-melb:xfs-kern:24689a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:33:51 +11:00
Nathan Scott ee2a4f7caa [XFS] Fix an intermittent pquota panic caused by dodgey quota flags to an
umount dquot flush call.

SGI-PV: 946444
SGI-Modid: xfs-linux-melb:xfs-kern:24680a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:33:36 +11:00
Nathan Scott 3ddb8fa98c [XFS] Sort out cosmetic differences between user and kernel copies of some
sources.

SGI-PV: 907752
SGI-Modid: xfs-linux-melb:xfs-kern:24659a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:33:02 +11:00
Nathan Scott a255a7456d [XFS] Make d_maxiosz report the real maximum (INT_MAX) so we dont
incorrectly limit people using this interface to size IO buffers.

SGI-PV: 910890
SGI-Modid: xfs-linux-melb:xfs-kern:24657a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:32:30 +11:00
Nathan Scott b04ed21a1f [XFS] Disable write barriers for now till intermittent IO errors are
understood.

SGI-PV: 912426
SGI-Modid: xfs-linux-melb:xfs-kern:202962a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:32:17 +11:00
Nathan Scott 13059ff04c [XFS] Reverse the sense of COMPAT_ATTR and ATTR2, keeps it simple and
consistent.

SGI-PV: 941645
SGI-Modid: xfs-linux-melb:xfs-kern:202961a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:32:01 +11:00
Christoph Hellwig e13a73f025 [XFS] Write log dummy record when freezing filesystem
SGI-PV: 945483
SGI-Modid: xfs-linux-melb:xfs-kern:202638a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:30:08 +11:00
Christoph Hellwig 1df84c930a [XFS] Mark some lookup tables const. Thanks to Arjan van de Ven for
spotting these.

SGI-PV: 946028
SGI-Modid: xfs-linux-melb:xfs-kern:202617a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:29:52 +11:00
Yingping Lu 1661dc8e7a [XFS] Fixed an assertion failure in xfs_reclaim caused by delayed block.
The assertion failure came from XFS QA41. The fix is done by enabling
truncate for delayed block in xfs_inactive.

SGI-PV: 945412
SGI-Modid: xfs-linux-melb:xfs-kern:202521a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:29:39 +11:00
Christoph Hellwig c7d437da3d [XFS] do barrier checks earlier. quota initialization may write to the
filesystem

SGI-PV: 912426
SGI-Modid: xfs-linux-melb:xfs-kern:202355a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:28:56 +11:00
Nathan Scott 70a061f1fd [XFS] Fix typo from when enabling write barriers by default, flags botch
in showargs.

SGI-PV: 912426
SGI-Modid: xfs-linux-melb:xfs-kern:24383a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:28:45 +11:00
Nathan Scott dd9f438e32 [XFS] Implement the di_extsize allocator hint for non-realtime files as
well.  Also provides a mechanism for inheriting this property from the
parent directory for new files.

SGI-PV: 945264
SGI-Modid: xfs-linux-melb:xfs-kern:24367a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:28:28 +11:00
Nathan Scott 061f7209bd [XFS] Do not inherit properties for the quota inodes from the root inode.
SGI-PV: 945264
SGI-Modid: xfs-linux-melb:xfs-kern:24366a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:27:50 +11:00
Christoph Hellwig 4ef19dddba [XFS] enable write barriers by default
SGI-PV: 912426
SGI-Modid: xfs-linux-melb:xfs-kern:201981a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:27:18 +11:00
Christoph Hellwig d3a9b1f9da [XFS] merge xfs_arch.h userspace changes back
SGI-PV: 907752
SGI-Modid: xfs-linux-melb:xfs-kern:201882a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:23:43 +11:00
Christoph Hellwig f60d36690c [XFS] remove over-eager assert
SGI-PV: 941804
SGI-Modid: xfs-linux-melb:xfs-kern:201702a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:22:04 +11:00
Nicolas Kaiser 099f7f0a82 xfs: header included twice
Header included twice.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-11 02:06:20 +01:00
Linus Torvalds ab396e91bf Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Fix up some trivial conflicts in {i386|ia64}/Makefile
2006-01-10 08:21:33 -08:00
Christoph Hellwig 7ff92053dd [PATCH] don't include ioctl32.h in drivers
These days ioctl32.h is only used for communication of fs/compat.c and
fs/compat_ioctl.c and doesn't contain anything of interest to drivers.

Remove inclusion in various drivers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:34 -08:00
Christoph Hellwig fc33a7bb9c [PATCH] per-mountpoint noatime/nodiratime
Turn noatime and nodiratime into per-mount instead of per-sb flags.

After all the preparations this is a rather trivial patch.  The mount code
needs to treat the two options as per-mount instead of per-superblock, and
touch_atime needs to be changed to check the new MNT_ flags in addition to
the MS_ flags that are kept for filesystems that are always
noatime/nodiratime but not user settable anymore.  Besides that core code
only nfs needed an update because it's leaving atime updates to the server
and thus sets the S_NOATIME flag on every inode, but needs to know whether
it's a real noatime mount for an getattr optimization.

While we're at it I've killed the IS_NOATIME/IS_NODIRATIME macros that were
only used by touch_atime.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:34 -08:00
Christoph Hellwig 870f481793 [PATCH] replace inode_update_time with file_update_time
To allow various options to work per-mount instead of per-sb we need a
struct vfsmount when updating ctime and mtime.  This preparation patch
replaces the inode_update_time routine with a file_update_atime routine so
we can easily get at the vfsmount.  (and the file makes more sense in this
context anyway).  Also get rid of the unused second argument - we always
want to update the ctime when calling this routine.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Anton Altaparmakov <aia21@cantab.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:30 -08:00
Christoph Hellwig 3542c6e18f [PATCH] remove xfs xattr permission checks
remove checks now in the VFS

XFS has an additional xattr interface through obscure ioctl.  it requires
raised capabilities but we need to add some read-only/immutable checks anyway

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Nathan Scott <nathans@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:30 -08:00
Jes Sorensen 1b1dcc1b57 [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
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>
2006-01-09 15:59:24 -08:00
Jes Sorensen 794ee1baee [PATCH] mutex subsystem, semaphore to mutex: XFS
This patch switches XFS over to use the new mutex code directly as
opposed to the previous workaround patch I posted earlier that avoided
the namespace clash by forcing it back to semaphores. This falls in the
'works for me<tm>' category.

Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2006-01-09 15:59:21 -08:00
Sam Ravnborg a9aa1ffaac kbuild/xfs: introduce fs/xfs/Kbuild
In kbuild the file named 'Kbuild' has precedence over the file named
Makefile. Utilise a file named Kbuild to include the 2.6 Makefile for xfs
- since the xfs people likes to keep their arch specific Makefiles separate.

With this patch xfs does no longer rely on the KERNELRELEASE components to be global.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-01-09 20:48:03 +01:00
Andrew Morton a136564702 [PATCH] remove gcc-2 checks
Remove various things which were checking for gcc-1.x and gcc-2.x compilers.

From: Adrian Bunk <bunk@stusta.de>

    Some documentation updates and removes some code paths for gcc < 3.2.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:14:02 -08:00
OGAWA Hirofumi 28fd129827 [PATCH] Fix and add EXPORT_SYMBOL(filemap_write_and_wait)
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>
2006-01-08 20:13:47 -08:00
Al Viro 51bfb75b0b [PATCH] xfs: missing gfp_t annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15 10:04:29 -08:00
Nathan Scott 551c81e2d3 [XFS] Resolve the xlog_grant_log_space hang, revert inline to macro.
SGI-PV: 946205
SGI-Modid: xfs-linux-melb:xfs-kern:24567a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-25 16:42:28 +11:00
Nathan Scott e0144ca553 [XFS] Fix a case where attr2 format was being used unconditionally.
SGI-PV: 941645
SGI-Modid: xfs-linux-melb:xfs-kern:24566a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-25 16:42:22 +11:00
Felix Blyakher 6b2cf618cc [XFS] Tight loop in xfs_finish_reclaim_all prevented the xfslogd to run
its queue of IO completion callbacks, thus creating the deadlock between
umount and xfslogd. Breaking the loop solves the problem.

SGI-PV: 943821
SGI-Modid: xfs-linux-melb:xfs-kern:202363a

Signed-off-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-25 16:42:13 +11:00
Nathan Scott a4656391b7 [XFS] Fix a 32 bit value wraparound when providing a mapping for a large
direct write.

SGI-PV: 944820
SGI-Modid: xfs-linux-melb:xfs-kern:24351a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-25 16:41:57 +11:00
Christoph Hellwig f33c6797bc [XFS] handle error returns from freeze_bdev
SGI-PV: 945483
SGI-Modid: xfs-linux-melb:xfs-kern:201884a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-25 16:41:47 +11:00
Eric Sandeen 55b02d74e1 [XFS] Fix potential overflow in xfs_iomap_t delta for very large extents
SGI-PV: 945311
SGI-Modid: xfs-linux-melb:xfs-kern:201708a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-25 16:41:33 +11:00
Olaf Hering 733482e445 [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason
This patch removes almost all inclusions of linux/version.h.  The 3
#defines are unused in most of the touched files.

A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
unfortunatly in linux/version.h.

There are also lots of #ifdef for long obsolete kernels, this was not
touched.  In a few places, the linux/version.h include was move to where
the LINUX_VERSION_CODE was used.

quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`

search pattern:
/UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09 07:55:57 -08:00
Pekka J Enberg 2109a2d1b1 [PATCH] mm: rename kmem_cache_s to kmem_cache
This patch renames struct kmem_cache_s to kmem_cache so we can start using
it instead of kmem_cache_t typedef.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:24 -08:00
Nathan Scott 15c84a4701 [XFS] Remove no-longer-used qsort source.
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-04 10:51:01 +11:00
Nathan Scott 05db218a27 [XFS] Fix an inode32 regression - if no options are presented, must still
set default flags.

SGI-PV: 945242
SGI-Modid: xfs-linux-melb:xfs-kern:24292a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-04 09:49:07 +11:00
Nathan Scott 992c83a129 [XFS] Remove several no-longer-used files.
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03 16:50:07 +11:00
Nathan Scott 7f248a81c5 [XFS] Cleanup cosmetic differences between source trees.
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03 16:14:31 +11:00
Nathan Scott 538524aed0 [XFS] fix XFS quota for modular XFS builds
Cannot build XFS filesystem support as module with quota support.  It
works only when the XFS filesystem support is compiled into the kernel.
Menuconfig prevents from setting CONFIG_XFS_FS=m and CONFIG_XFS_QUOTA=y.

How to reproduce: configure the XFS filesystem with quota support as
module.  The resulting kernel won't have quota support compiled into
xfs.ko.

Fix: Changing the fs/xfs/Kconfig file from tristate to bool lets you
configure the quota support to be compiled into the XFS module.  The
Makefile-linux-2.6 checks only for CONFIG_XFS_QUOTA=y.

Signed-off-by: Dimitri Puzin <tristan-777@ddkom-online.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03 13:55:06 +11:00
Yingping Lu bf6f05aa0b [XFS] Fixed the inconsistency between attribute b-tree intermidiate node
and leaf blocks. The problem cam from xfsqa test 117.

SGI-PV: 940655
SGI-Modid: xfs-linux:xfs-kern:201527a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03 10:31:47 +11:00
Nathan Scott 19d5bcf370 [XFS] Ensure fsync does not incorrectly return EIO for pages beyond EOF.
SGI-PV: 944819
SGI-Modid: xfs-linux:xfs-kern:24236a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:14:09 +11:00
Eric Sandeen a749ee8615 [XFS] Fix calculation of reserved AGs for inodes in 32-bit inode mode
Spotted by Roger Willcocks <willcor @at@ gmail.com>

SGI-PV: 944858
SGI-Modid: xfs-linux:xfs-kern:201213a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:13:42 +11:00
Nathan Scott fdc7ed75c0 [XFS] Fix boundary conditions when issuing direct IOs from large userspace
buffers.

SGI-PV: 944820
SGI-Modid: xfs-linux:xfs-kern:24223a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:13:13 +11:00
Nathan Scott 2b3b6d07f7 [XFS] Remove an unhelpful ifdef, the comment above the routine explains
the purpose well enough here.

SGI-PV: 944821
SGI-Modid: xfs-linux:xfs-kern:24214a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:12:28 +11:00
Nathan Scott cfcbbbd089 [XFS] Remove old, broken nolog-mode code - noone plans to ever fix it.
SGI-PV: 944821
SGI-Modid: xfs-linux:xfs-kern:24213a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:12:04 +11:00
Nathan Scott c11e2c369d [XFS] Rework fid encode/decode wrt 64 bit inums interacting with NFS.
SGI-PV: 937127
SGI-Modid: xfs-linux:xfs-kern:24201a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:11:45 +11:00
Christoph Hellwig 16259e7d95 [XFS] Endianess annotations for various allocator data structures
SGI-PV: 943272
SGI-Modid: xfs-linux:xfs-kern:201006a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:11:25 +11:00
Eric Sandeen e2ed81fbbb [XFS] remove unused code from xfs_iomap_write_direct
SGI-PV: 943266
SGI-Modid: xfs-linux:xfs-kern:200996a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:10:55 +11:00
Eric Sandeen e94af02a9c [XFS] fix old xfs_setattr mis-merge from irix; mostly harmless esp if not
using xfs rt

SGI-PV: 944632
SGI-Modid: xfs-linux:xfs-kern:200983a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:10:41 +11:00
Yingping Lu 91e11088f8 [XFS] Fixing size report discrepancy between ls and du caused by xfs_fsr
SGI-PV: 943908
SGI-Modid: xfs-linux:xfs-kern:200874a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:10:24 +11:00
Yingping Lu 9af0a70c07 [XFS] Fixed a bug in reporting extent list for attribute fork running
xfs_bmap -a.

SGI-PV: 944075
SGI-Modid: xfs-linux:xfs-kern:200860a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:09:54 +11:00
Christoph Hellwig 7f14d0a013 [XFS] Simplify pagebuf_rele Remove a conditional that can not be true
anymore and simplify the final put path a little

SGI-PV: 908809
SGI-Modid: xfs-linux:xfs-kern:200790a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:09:35 +11:00
Nathan Scott e718eeb4fe [XFS] Rework the final mount options flag bit to make room for more.
SGI-PV: 943866
SGI-Modid: xfs-linux:xfs-kern:24030a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:09:22 +11:00
Nathan Scott 6b3f6b5b87 [XFS] Rework the dquot hash sizing heuristics.
SGI-PV: 943123
SGI-Modid: xfs-linux:xfs-kern:24012a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:08:25 +11:00
Eric Sandeen 1f730e3b53 [XFS] Add ATTR_NOSIZETOK definition for xfs_vnodeops.c change
SGI-PV: 942439
SGI-Modid: xfs-linux:xfs-kern:200185a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:08:10 +11:00
Nathan Scott 8a319ae494 [XFS] Disable attr2 by default, until a more appropriate time to enable
it.

SGI-PV: 941645
SGI-Modid: xfs-linux:xfs-kern:24002a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:07:51 +11:00
Eric Sandeen 374e2ac337 [XFS] Prevent data corruption on extending truncate case from cxfs client
SGI-PV: 942439
SGI-Modid: xfs-linux:xfs-kern:200152a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:07:34 +11:00
Christoph Hellwig 4750ddb0ba [XFS] Fix sparse warnings in ktrace.[ch]
SGI-PV: 943556
SGI-Modid: xfs-linux:xfs-kern:200113a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:07:23 +11:00
Christoph Hellwig 5bde1ba99c [XFS] silence gcc4 warnings. the directory ones are wrong because of
information gcc could not find out (that a directory always has a ..
entry), the others are outright gcc bugs.

SGI-PV: 943511
SGI-Modid: xfs-linux:xfs-kern:200055a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:06:18 +11:00
Nathan Scott 9dac13e7ff [XFS] Remove unused type, xfs_gap_t.
SGI-PV: 907752
SGI-Modid: xfs-linux:xfs-kern:23932a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:05:34 +11:00
Christoph Hellwig 1149d96ae8 [XFS] endianess annotations and cleanup for the quota code
SGI-PV: 943272
SGI-Modid: xfs-linux:xfs-kern:199767a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:01:12 +11:00
Nathan Scott fa7e7d71e0 [XFS] Show additional mount options in /proc/mounts, fix up some debug
code.

SGI-PV: 941645
SGI-Modid: xfs-linux:xfs-kern:23926a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:00:48 +11:00
Nathan Scott da087bad81 [XFS] Fix up a 32/64 local flags variable issue when enabling attr2 mode.
SGI-PV: 941645
SGI-Modid: xfs-linux:xfs-kern:23925a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:00:20 +11:00
Eric Sandeen 0116d9356b [XFS] Remove dead code in xfs_iomap_write_direct; save some stack
SGI-PV: 943266
SGI-Modid: xfs-linux:xfs-kern:199750a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 15:00:01 +11:00
Nathan Scott 4ce3121f67 [XFS] Update license/copyright notices to match the prefered SGI
boilerplate.

SGI-PV: 913862
SGI-Modid: xfs-linux:xfs-kern:23917a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02 14:59:41 +11:00