Commit Graph

89 Commits (a991304496bdaec09f497d1eb5d9dcf2f94b7d5d)

Author SHA1 Message Date
Al Viro dd0fc66fb3 [PATCH] gfp flags annotations - part 1
- added typedef unsigned int __nocast gfp_t;

 - replaced __nocast uses for gfp flags with gfp_t - it gives exactly
   the same warnings as far as sparse is concerned, doesn't change
   generated code (from gcc point of view we replaced unsigned int with
   typedef) and documents what's going on far better.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-08 15:00:57 -07:00
Nishanth Aravamudan 041e0e3b19 [PATCH] fs: fix-up schedule_timeout() usage
Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.  Also use helper
functions to convert between human time units and jiffies rather than constant
HZ division to avoid rounding errors.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-10 10:06:36 -07:00
Ingo Molnar a9f6a0dd54 [PATCH] more SPIN_LOCK_UNLOCKED -> DEFINE_SPINLOCK conversions
This converts the final 20 DEFINE_SPINLOCK holdouts.  (another 580 places
are already using DEFINE_SPINLOCK).  Build tested on x86.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 14:03:48 -07:00
Nathan Scott c9fc0d6a69 [XFS] Revert recent quota Makefile change, not in a fit state for merging.
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-09 11:38:09 +10:00
Nathan Scott eccdfcd6f8 [XFS] Fix modular XFS builds (Makefile botch).
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-08 15:38:52 +10:00
Nathan Scott 20ba02879b [XFS] Remove special Kconfig XFS menu, make XFS options "inline".
Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-08 15:34:58 +10:00
Nathan Scott f016bad6be [XFS] Cleanup some -Wundef flag warnings in the endian macros (thanks
Christoph).

SGI-PV: 942400
SGI-Modid: xfs-linux-melb:xfs-kern:23771a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-08 15:30:05 +10:00
Nathan Scott cde410a99d [XFS] Sort out some cosmetic differences between XFS trees.
SGI-PV: 904196
SGI-Modid: xfs-linux-melb:xfs-kern:23719a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 11:47:01 +10:00
Nathan Scott c31e887807 [XFS] Fix incorrect use of BMAPI_READ in unwritten extent handling
(luckily just cosmetic).

SGI-PV: 942232
SGI-Modid: xfs-linux-melb:xfs-kern:23718a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 10:06:55 +10:00
Christoph Hellwig a3c476d8a1 [XFS] replace "extern inline" with "static inline" Patch from Adrian Bunk
<bunk@stusta.de>, thanks a lot!

SGI-PV: 942227
SGI-Modid: xfs-linux:xfs-kern:198642a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:40:49 +10:00
Christoph Hellwig 4df08c5258 [XFS] Switch kernel thread handling to the kthread_ API
SGI-PV: 942063
SGI-Modid: xfs-linux:xfs-kern:198388a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:34:18 +10:00
David Chinner 2f92658751 [XFS] Fix racy access to pb_flags. pagebuf_rele() modified pb_flags after
the pagebuf had been unlocked if the buffer was delwri. At high load, this
could result in a race when the superblock was being synced that would
result the flags being incorrect and the iodone functions being executed
incorrectly. This then leads to iclog callback failures or AIL list
corruptions resulting in filesystem shutdowns.

SGI-PV: 923981
SGI-Modid: xfs-linux:xfs-kern:23616a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:33:35 +10:00
Christoph Hellwig ba403ab43e [XFS] Retry linux inode cacech lookup if we found a stale inode. This
fixes crashes under high nfs load

SGI-PV: 941429
SGI-Modid: xfs-linux:xfs-kern:197929a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:33:00 +10:00
Tim Shimmin efa092f3d4 [XFS] Fixes a bug in the quota code when allocating a new dquot record
which can cause an extent hole to be filled and a free extent to be
processed. In this case, we make a few mistakes: forget to pass back the
transaction, forget to put a hold on the buffer and forget to add the buf
to the new transaction.

SGI-PV: 940366
SGI-Modid: xfs-linux:xfs-kern:23594a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:29:01 +10:00
Christoph Hellwig 0f9fffbcc1 [XFS] remove some dead code from pagebuf
SGI-PV: 934766
SGI-Modid: xfs-linux:xfs-kern:197783a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:28:16 +10:00
Christoph Hellwig 02ba71de98 [XFS] allow a null behaviour pointer in linvfs_clear_inode
SGI-PV: 940531
SGI-Modid: xfs-linux:xfs-kern:197782a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:28:02 +10:00
Nathan Scott 53937c52c3 [XFS] Manage spinlock differences between kernel versions a bit.
SGI-PV: 904196
SGI-Modid: xfs-linux:xfs-kern:23563a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:27:50 +10:00
Eric Sandeen 526c420c44 [XFS] add handlers to fix xfs_flock_t alignment issues in compat ioctls
SGI-PV: 938899
SGI-Modid: xfs-linux:xfs-kern:197403a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:25:06 +10:00
Felix Blyakher 0c147f9a86 [XFS] Check if there is first behavior before calling VOP_RECLAIM from
linvfs_clear_inode(). The behavior may go away in VOP_INACTIVE. 

SGI-PV: 941000
SGI-Modid: xfs-linux:xfs-kern:197355a

Signed-off-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:24:49 +10:00
Tim Shimmin 4cd4a034a3 [XFS] Need to be able to reset sb_qflags if not mounting with quotas
having previously mounted with quotas.

SGI-PV: 940491
SGI-Modid: xfs-linux:xfs-kern:23388a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:24:10 +10:00
Christoph Hellwig 56d433e430 [XFS] streamline the clear_inode path
SGI-PV: 940531
SGI-Modid: xfs-linux:xfs-kern:196888a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:23:54 +10:00
Christoph Hellwig c1a073bdff [XFS] Delay I/O completion for unwritten extents after conversion
SGI-PV: 936584
SGI-Modid: xfs-linux:xfs-kern:196886a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:23:35 +10:00
Christoph Hellwig f09738638d [XFS] Delay direct I/O completion to a workqueue This is nessecary
because aio+dio completions may happen from irq context but we need
process context for converting unwritten extents.  We also queue regular
direct I/O completions to workqueue for regularity, there's only one
queue_work call per syscall.

SGI-PV: 934766
SGI-Modid: xfs-linux:xfs-kern:196857a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:22:52 +10:00
Christoph Hellwig 65b3da3705 [XFS] Add in the new xfs_aops.h header file for I/O completion struct.
SGI-PV: 934766
SGI-Modid: xfs-linux:xfs-kern:196857a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-05 08:18:12 +10:00
Christoph Hellwig 0829c3602f [XFS] Add infrastructure for tracking I/O completions
SGI-PV: 934766
SGI-Modid: xfs-linux:xfs-kern:196856a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:58:49 +10:00
Christoph Hellwig 51c91ed52b [XFS] add infrastructure for waiting on I/O completion at inode reclaim
time

SGI-PV: 934766
SGI-Modid: xfs-linux:xfs-kern:196854a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:58:38 +10:00
Christoph Hellwig 592cb26bda [XFS] remove unessecary vnode flags
SGI-PV: 934766
SGI-Modid: xfs-linux:xfs-kern:196852a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:56:14 +10:00
Christoph Hellwig 760dea671e [XFS] Fix sparse warnings in kmem_* functions Patch from Victor Fusco
<victor@cetuc.puc-rio.br>

SGI-PV: 940376
SGI-Modid: xfs-linux:xfs-kern:196705a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:56:02 +10:00
Tim Shimmin 6f948fbd44 [XFS] Need to unlock the AIL before calling xfs_force_shutdown() because
when it goes to force out the log, and get the tail lsn, it will want to
get the AIL lock.

SGI-PV: 940076
SGI-Modid: xfs-linux:xfs-kern:23260a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:52:55 +10:00
Christoph Hellwig 0432dab2d2 [XFS] remove struct vnode::v_type
SGI-PV: 936236
SGI-Modid: xfs-linux:xfs-kern:195878a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:46:51 +10:00
Nathan Scott 155ffd075c [XFS] Remove extraneous quotacheck diagnostics.
SGI-PV: 907752
SGI-Modid: xfs-linux:xfs-kern:23163a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:43:48 +10:00
Nathan Scott e69a333b5e [XFS] Add in grpid/nogrpid mount option parsing, actual code was always
there..

SGI-PV: 939444
SGI-Modid: xfs-linux:xfs-kern:23162a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:42:26 +10:00
Tim Shimmin 7e9c639615 [XFS] 929956 add log debugging and tracing info
SGI-PV: 931456
SGI-Modid: xfs-linux:xfs-kern:23155a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:42:05 +10:00
Tim Shimmin 32fb9b57ae [XFS] Fix up the calculation of the reservation overhead to hopefully
include all the components which make up the transaction in the ondisk
log. Having this incomplete has shown up as problems on IRIX when some v2
log changes went in. The symptom was the msg of "xfs_log_write:
reservation ran out. Need to up reservation" and was seen on synchronous
writes on files with lots of holes (and therefore lots of extents).

SGI-PV: 931457
SGI-Modid: xfs-linux:xfs-kern:23095a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:41:43 +10:00
Nathan Scott d52b44d07a [XFS] Fix regression in transaction reserved-block accounting for direct
writes.

SGI-PV: 938145
SGI-Modid: xfs-linux:xfs-kern:23088a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:41:32 +10:00
Eric Sandeen ad4a8ac4e9 [XFS] Fix check for writeable file in xfs_ioc_space ioctl code
SGI-PV: 938905
SGI-Modid: xfs-linux:xfs-kern:195240a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:41:16 +10:00
David Chinner 3bdbfb104e [XFS] Prevent the incore superblock sb_fdblocks count from leaking when we
are getting ENOSPC errors on writes. When we fail to allocate space for
indirect blocks in xfs_bmapi() make sure we release the direct block
allocation before returning.

SGI-PV: 938502
SGI-Modid: xfs-linux:xfs-kern:22986a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:40:47 +10:00
Nathan Scott bcec2b7f2b [XFS] Add a chunk of tracing code to diagnose truncate related issues.
SGI-PV: 938410
SGI-Modid: xfs-linux:xfs-kern:22966a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:40:17 +10:00
Nathan Scott eedb5530aa [XFS] Make metadata IO completion consistent with other IO completion
handlers.

SGI-PV: 938409
SGI-Modid: xfs-linux:xfs-kern:22965a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:39:56 +10:00
Christoph Hellwig cdb626878f [XFS] replace vn_get usage by ihold
SGI-PV: 938306
SGI-Modid: xfs-linux:xfs-kern:194627a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 16:24:19 +10:00
Dean Roehrich bb3f724e12 [XFS] send dmapi events from nopage for mmapped files
SGI-PV: 935317
SGI-Modid: xfs-linux:xfs-kern:192007a

Signed-off-by: Dean Roehrich <roehrich@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 15:43:05 +10:00
Dean Roehrich 536388be42 [XFS] upate copyrights
SGI-PV: 933765
SGI-Modid: xfs-linux:xfs-kern:190760a

Signed-off-by: Dean Roehrich <roehrich@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 15:35:43 +10:00
Dean Roehrich 616b1c7238 [XFS] Update copyrights
SGI-PV: 933551
SGI-Modid: xfs-linux:xfs-kern:190625a

Signed-off-by: Dean Roehrich <roehrich@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-09-02 15:30:57 +10:00
Al Viro 008b150a3c [PATCH] Fix up symlink function pointers
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>
2005-08-19 18:08:21 -07:00
Christoph Lameter 3e1d1d28d9 [PATCH] Cleanup patch for process freezing
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>
2005-06-25 17:10:13 -07:00
Christoph Hellwig 92198f7eaa [PATCH] pass iocb to dio_iodone_t
XFS will have to look at iocb->private to fix aio+dio.  No other filesystem
is using the blockdev_direct_IO* end_io callback.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-24 00:05:19 -07:00
Linus Torvalds 2a5a68b840 Merge rsync://oss.sgi.com/git/xfs-2.6 2005-06-21 19:51:18 -07:00
Ingo Molnar 39c715b717 [PATCH] smp_processor_id() cleanup
This patch implements a number of smp_processor_id() cleanup ideas that
Arjan van de Ven and I came up with.

The previous __smp_processor_id/_smp_processor_id/smp_processor_id API
spaghetti was hard to follow both on the implementational and on the
usage side.

Some of the complexity arose from picking wrong names, some of the
complexity comes from the fact that not all architectures defined
__smp_processor_id.

In the new code, there are two externally visible symbols:

 - smp_processor_id(): debug variant.

 - raw_smp_processor_id(): nondebug variant. Replaces all existing
   uses of _smp_processor_id() and __smp_processor_id(). Defined
   by every SMP architecture in include/asm-*/smp.h.

There is one new internal symbol, dependent on DEBUG_PREEMPT:

 - debug_smp_processor_id(): internal debug variant, mapped to
                             smp_processor_id().

Also, i moved debug_smp_processor_id() from lib/kernel_lock.c into a new
lib/smp_processor_id.c file.  All related comments got updated and/or
clarified.

I have build/boot tested the following 8 .config combinations on x86:

 {SMP,UP} x {PREEMPT,!PREEMPT} x {DEBUG_PREEMPT,!DEBUG_PREEMPT}

I have also build/boot tested x64 on UP/PREEMPT/DEBUG_PREEMPT.  (Other
architectures are untested, but should work just fine.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21 18:46:13 -07:00
Dean Roehrich e1a40fa907 [XFS] Handle inode semaphores properly for dmapi queues
SGI-PV: 931572
SGI-Modid: xfs-linux-melb:xfs-kern:189560a

Signed-off-by: Dean Roehrich <roehrich@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-06-22 10:20:44 +10:00
Nathan Scott ad89d0212e [XFS] Remove some debugging code from quota syscalls.
SGI-PV: 932952
SGI-Modid: xfs-linux-melb:xfs-kern:22929a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-06-21 15:57:57 +10:00