30 Apr, 2008
1 commit
-
Noted-by: Stephen Rothwell
Signed-off-by: Dave Chinner
Signed-off-by: Linus Torvalds
29 Apr, 2008
24 commits
-
Signed-off-by: Stephen Rothwell
Signed-off-by: Lachlan McIlroy -
The dmapi cruft in xfs_file.c is totally out of date in mainline vs
CVS, and at this point just removing this code which can't be used on
mainline at all seems to be the best option to keep it maintainable.Signed-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
Remove the last sendfile leftovers in mainline. This code is already
gone in CVS.Signed-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
Back when I first submitted XFS for mainline inclusion we made the
decision that the debug code is far to extensive to be accidentally
enabled by users in mainline. But then again it's often quite useful
to track problems down and hacking the makefile all the time is rather
annoying. Given all the debug options with even more overhead like
lockdep or DEBUG_PAGE_ALLOC users (or rather developers) should know
by now what they're doing.Signed-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
When we allocation new inode chunks, we initialise the generation numbers
to zero. This works fine until we delete a chunk and then reallocate it,
resulting in the same inode numbers but with a reset generation count.
This can result in inode/generation pairs of different inodes occurring
relatively close together.Given that the inode/gen pair makes up the "unique" portion of an NFS
filehandle on XFS, this can result in file handles cached on clients being
seen on the wire from the server but refer to a different file. This
causes .... issues for NFS clients.Hence we need a unique generation number initialisation for each inode to
prevent reuse of a small portion of the generation number space. Use a
random number to initialise the generation number so we don't need to keep
any new state on disk whilst making the new number difficult to guess from
previous allocations.SGI-PV: 979416
SGI-Modid: xfs-linux-melb:xfs-kern:31001aSigned-off-by: David Chinner
Signed-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
The check for block zero access should be done on non-realtime inodes. Fix
the logic error in xfs_write_iomap_allocate(), and simplify the logic on
all checks for block zero access in xfs_iomap.cSGI-PV: 980888
SGI-Modid: xfs-linux-melb:xfs-kern:30998aSigned-off-by: David Chinner
Signed-off-by: Lachlan McIlroy -
On uniprocessor machines, the incore superblock is used for all in memory
accounting of free blocks. in this situation, changes to the reserved
block count are accounted twice; once directly and once via
xfs_mod_incore_sb(). Seeing as the modification on SMP is done via
xfs_mod_incore_sb(), make this the only update mechanism that UP uses as
well.SGI-PV: 980654
SGI-Modid: xfs-linux-melb:xfs-kern:30997aSigned-off-by: David Chinner
Signed-off-by: Lachlan McIlroy -
Fix bug introduced in commit eb01c9cd87c7a9998c2edf209721ea069e3e3652 aka
"[XFS] Remove the xlog_ticket allocator"SGI-PV: 980887
SGI-Modid: xfs-linux-melb:xfs-kern:30995aSigned-off-by: Alexey Dobriyan
Signed-off-by: David Chinner
Signed-off-by: Lachlan McIlroy -
xfs_reserve_blocks() calls xfs_icsb_sync_counters_locked(), which is not
defined if !CONFIG_SMP/!HAVE_PERCPU_SBSGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30991aSigned-off-by: Eric Sandeen
Signed-off-by: Lachlan McIlroy -
Commit e687330b5ed1ea899fdaf0dea50aba196b6e019a was meant to remove the
unused HAVE_SPLICE macro, instead an unrelated change was checked enabling
QUOTADEBUG when building DEBUG XFS. Restore the intended changes.SGI-PV: 971046
SGI-Modid: xfs-linux-melb:xfs-kern:30924aSigned-off-by: Donald Douwsma
Signed-off-by: Barry Naujok
Signed-off-by: Lachlan McIlroy -
With the last two patches XFS_ICSB_SB_LOCKED is never checked and only
superflously passed to xfs_icsb_count, so kill it.SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30920aSigned-off-by: Christoph Hellwig
Signed-off-by: David Chinner
Signed-off-by: Lachlan McIlroy -
Add an xfs_icsb_balance_counter_locked for the case where mp->m_sb_lock is
already locked.SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30918aSigned-off-by: Christoph Hellwig
Signed-off-by: David Chinner
Signed-off-by: Lachlan McIlroy -
Add a new xfs_icsb_sync_counters_locked for the case where m_sb_lock
is already taken and add a flags argument to xfs_icsb_sync_counters so
that xfs_icsb_sync_counters_flags is not needed.SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30917aSigned-off-by: Christoph Hellwig
Signed-off-by: David Chinner
Signed-off-by: Lachlan McIlroy -
SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30913aSigned-off-by: Barry Naujok
Signed-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
The VFS always has an inode reference when we call these functions. So we
only need to grab a signle reference to each inode that's joined to a
transaction - all the other bumping and dropping is as useless as the
comments describing the IRIX semantics.SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30912aSigned-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
VFS guaranteed these can't happen.
SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30911aSigned-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
Similar to to the previous patch for remove and rmdir only grab a
reference to inodes when we join them to transaction to balance the
decrement on transaction completion. Everything else it taken care of by
the VFS.Note that the old case had leaks of inode count when src == target or src
or target == one of the parent inodes, but these cases are fortunately
already rejected by the VFS.SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30904aSigned-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
->rename already gets the target inode passed if it exits. Pass it down to
xfs_rename so that we can avoid looking it up again. Also simplify locking
as the first lock section in xfs_rename can go away now: the isdir is an
invariant over the lifetime of the inode, and new_parent and the nlink
check are namespace topology protected by i_mutex in the VFS. The projid
check needs to move into the second lock section anyway to not be racy.Also kill the now unused xfs_dir_lookup_int and remove the now-unused
first_locked argumet to xfs_lock_inodes.SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30903aSigned-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
The writer field is not needed for non_DEBU builds so remove it. While
we're at i also clean up the interface for is locked asserts to go through
and xfs_iget.c helper with an interface like the xfs_ilock routines to
isolated the XFS codebase from mrlock internals. That way we can kill
mrlock_t entirely once rw_semaphores grow an islocked facility. Also
remove unused flags to the ilock family of functions.SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30902aSigned-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
Opencode xfs-kill-xfs_dir_lookup_int here, which gets rid of a lock
roundtrip, and lots of stack space. Also kill the di_mode == 0 check that
has been done in xfs_iget for a few years now.SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30901aSigned-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
Similar to rmdir and remove - avoids a potential transaction reservation
overrun.SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30900aSigned-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
Unless XFS_IGET_CREATE is passed xfs_iget will return ENOENT if it
encounters an inode with di_mode == 0. Remove the duplicated checks in the
callers.(the log recovery case is not touched for now)
SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30898aSigned-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
It's currently used by the ACL code to read di_mode/di_uid, but these are
simple 32bit scalar values we can just read directly without locking.SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30897aSigned-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
We can just check i_mode / di_mode directly.
SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30896aSigned-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy
22 Apr, 2008
1 commit
-
* 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc:
Deprecate the asm/semaphore.h files in feature-removal-schedule.
Convert asm/semaphore.h users to linux/semaphore.h
security: Remove unnecessary inclusions of asm/semaphore.h
lib: Remove unnecessary inclusions of asm/semaphore.h
kernel: Remove unnecessary inclusions of asm/semaphore.h
include: Remove unnecessary inclusions of asm/semaphore.h
fs: Remove unnecessary inclusions of asm/semaphore.h
drivers: Remove unnecessary inclusions of asm/semaphore.h
net: Remove unnecessary inclusions of asm/semaphore.h
arch: Remove unnecessary inclusions of asm/semaphore.h
19 Apr, 2008
3 commits
-
Elevate the write count during the xfs m/ctime updates.
XFS has to do it's own timestamp updates due to an unfortunate VFS
design limitation, so it will have to track writers by itself aswell.[hch: split out from the touch_atime patch as it's not related to it at all]
Acked-by: Al Viro
Signed-off-by: Christoph Hellwig
Signed-off-by: Dave Hansen
Signed-off-by: Al Viro -
Some ioctl()s can cause writes to the filesystem. Take these, and make them
use mnt_want/drop_write() instead.[AV: updated]
Acked-by: Al Viro
Signed-off-by: Christoph Hellwig
Signed-off-by: Dave Hansen
Signed-off-by: Andrew Morton
Signed-off-by: Al Viro -
Signed-off-by: Matthew Wilcox
18 Apr, 2008
11 commits
-
associated comment about gcc behavior really aren't needed; all of these
functions are marked STATIC which includes noinline, and the stack usage
won't be a problem.This effectively just removes the forward declarations and moves
xfs_ioctl() back to the end of the file.SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30534aSigned-off-by: Eric Sandeen
Signed-off-by: Niv Sardi
Signed-off-by: Lachlan McIlroy -
HAVE_SPLICE was part of the infrastructure for building 2.4 and 2.6
kernels out of the same tree. Now we don't build 2.4 kernels thisSGI-PV: 971046
SGI-Modid: xfs-linux-melb:xfs-kern:30878aSigned-off-by: Donald Douwsma
Signed-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
There is no point to the CONFIG_XFS_SECURITY option; it disables the
ability to set security attributes at runtime, but it does not actually
slim down or remove any code for runtime. Just remove it and always allow
security attributes to be set.SGI-PV: 980310
SGI-Modid: xfs-linux-melb:xfs-kern:30877aSigned-off-by: Eric Sandeen
Signed-off-by: Tim Shimmin
Signed-off-by: Lachlan McIlroy -
Fix up xfs_bmap_compute_maxlevels() to account for the case when we go
from using attr2 to using attr1. In that case attr1 will no longer
necessarily be at m_attr_offset>>3, but could be at a different value for
di_forkoff. Therefore, we return the worst case scenario using MINDBTPTRS
and MINABTPTRS, as this function is used for determining the maximum log
space.SGI-PV: 979606
SGI-Modid: xfs-linux-melb:xfs-kern:30862aSigned-off-by: Tim Shimmin
Signed-off-by: Eric Sandeen
Signed-off-by: Lachlan McIlroy -
In the case where we mount a filesystem which was previously using the
attr2 format as attr1, returning the default mp->m_attroffset instead of
the per-inode di_forkoff for inline attribute fit calculations, may result
in corruption, if for example, the data fork is already taking more space
than the default fork offset and we try to add an extended attribute. Fix
tested by xfstests/186.SGI-PV: 979606
SGI-Modid: xfs-linux-melb:xfs-kern:30861aSigned-off-by: Eric Sandeen
Signed-off-by: Tim Shimmin
Signed-off-by: Lachlan McIlroy -
On success, we still need to join the inode to the current transaction in
xfs_itruncate_finish(). Fixes regression from error handling changes.SGI-PV: 980084
SGI-Modid: xfs-linux-melb:xfs-kern:30845aSigned-off-by: David Chinner
Signed-off-by: Christoph Hellwig
Signed-off-by: Lachlan McIlroy -
xfssyncd triggers the logging of superblock counters every 30s if the
filesystem is made with lazy-count=1. This will prevent disks from idling
and spinning down as there will be a log write every 30s. With the way
counter recovery works for lazy-count=1, this code is unnecessary and
provides no real benefit, so just remove it.SGI-PV: 980145
SGI-Modid: xfs-linux-melb:xfs-kern:30840aSigned-off-by: David Chinner
Signed-off-by: Barry Naujok
Signed-off-by: Lachlan McIlroy -
Fix a logic error in xfs_alloc_ag_vextent_near(). This is a regression
introduced by the error handling changes.SGI-PV: 890084
SGI-Modid: xfs-linux-melb:xfs-kern:30838aSigned-off-by: David Chinner
Signed-off-by: Barry Naujok
Signed-off-by: Lachlan McIlroy -
xfsbdstrat() made all I/Os error out, good or bad. Fix it.
SGI-PV: 980084
SGI-Modid: xfs-linux-melb:xfs-kern:30836aSigned-off-by: David Chinner
Signed-off-by: Donald Douwsma
Signed-off-by: Lachlan McIlroy -
Unmounting the log can fail. unlikely, but it can. Catch all the error
conditions an make sure it's propagated upwards.SGI-PV: 980084
SGI-Modid: xfs-linux-melb:xfs-kern:30833aSigned-off-by: David Chinner
Signed-off-by: Niv Sardi
Signed-off-by: Lachlan McIlroy