Commit 0f3278d1 authored by Linus Torvalds's avatar Linus Torvalds
parents 06024f21 15c84a47
...@@ -19,15 +19,43 @@ Mount Options ...@@ -19,15 +19,43 @@ Mount Options
When mounting an XFS filesystem, the following options are accepted. When mounting an XFS filesystem, the following options are accepted.
biosize=size allocsize=size
Sets the preferred buffered I/O size (default size is 64K). Sets the buffered I/O end-of-file preallocation size when
"size" must be expressed as the logarithm (base2) of the doing delayed allocation writeout (default size is 64KiB).
desired I/O size. Valid values for this option are page size (typically 4KiB)
Valid values for this option are 14 through 16, inclusive through to 1GiB, inclusive, in power-of-2 increments.
(i.e. 16K, 32K, and 64K bytes). On machines with a 4K
pagesize, 13 (8K bytes) is also a valid size. attr2/noattr2
The preferred buffered I/O size can also be altered on an The options enable/disable (default is disabled for backward
individual file basis using the ioctl(2) system call. compatibility on-disk) an "opportunistic" improvement to be
made in the way inline extended attributes are stored on-disk.
When the new form is used for the first time (by setting or
removing extended attributes) the on-disk superblock feature
bit field will be updated to reflect this format being in use.
barrier
Enables the use of block layer write barriers for writes into
the journal and unwritten extent conversion. This allows for
drive level write caching to be enabled, for devices that
support write barriers.
dmapi
Enable the DMAPI (Data Management API) event callouts.
Use with the "mtpt" option.
grpid/bsdgroups and nogrpid/sysvgroups
These options define what group ID a newly created file gets.
When grpid is set, it takes the group ID of the directory in
which it is created; otherwise (the default) it takes the fsgid
of the current process, unless the directory has the setgid bit
set, in which case it takes the gid from the parent directory,
and also gets the setgid bit set if it is a directory itself.
ihashsize=value
Sets the number of hash buckets available for hashing the
in-memory inodes of the specified mount point. If a value
of zero is used, the value selected by the default algorithm
will be displayed in /proc/mounts.
ikeep/noikeep ikeep/noikeep
When inode clusters are emptied of inodes, keep them around When inode clusters are emptied of inodes, keep them around
...@@ -35,12 +63,31 @@ When mounting an XFS filesystem, the following options are accepted. ...@@ -35,12 +63,31 @@ When mounting an XFS filesystem, the following options are accepted.
and is still the default for now. Using the noikeep option, and is still the default for now. Using the noikeep option,
inode clusters are returned to the free space pool. inode clusters are returned to the free space pool.
inode64
Indicates that XFS is allowed to create inodes at any location
in the filesystem, including those which will result in inode
numbers occupying more than 32 bits of significance. This is
provided for backwards compatibility, but causes problems for
backup applications that cannot handle large inode numbers.
largeio/nolargeio
If "nolargeio" is specified, the optimal I/O reported in
st_blksize by stat(2) will be as small as possible to allow user
applications to avoid inefficient read/modify/write I/O.
If "largeio" specified, a filesystem that has a "swidth" specified
will return the "swidth" value (in bytes) in st_blksize. If the
filesystem does not have a "swidth" specified but does specify
an "allocsize" then "allocsize" (in bytes) will be returned
instead.
If neither of these two options are specified, then filesystem
will behave as if "nolargeio" was specified.
logbufs=value logbufs=value
Set the number of in-memory log buffers. Valid numbers range Set the number of in-memory log buffers. Valid numbers range
from 2-8 inclusive. from 2-8 inclusive.
The default value is 8 buffers for filesystems with a The default value is 8 buffers for filesystems with a
blocksize of 64K, 4 buffers for filesystems with a blocksize blocksize of 64KiB, 4 buffers for filesystems with a blocksize
of 32K, 3 buffers for filesystems with a blocksize of 16K of 32KiB, 3 buffers for filesystems with a blocksize of 16KiB
and 2 buffers for all other configurations. Increasing the and 2 buffers for all other configurations. Increasing the
number of buffers may increase performance on some workloads number of buffers may increase performance on some workloads
at the cost of the memory used for the additional log buffers at the cost of the memory used for the additional log buffers
...@@ -49,10 +96,10 @@ When mounting an XFS filesystem, the following options are accepted. ...@@ -49,10 +96,10 @@ When mounting an XFS filesystem, the following options are accepted.
logbsize=value logbsize=value
Set the size of each in-memory log buffer. Set the size of each in-memory log buffer.
Size may be specified in bytes, or in kilobytes with a "k" suffix. Size may be specified in bytes, or in kilobytes with a "k" suffix.
Valid sizes for version 1 and version 2 logs are 16384 (16k) and Valid sizes for version 1 and version 2 logs are 16384 (16k) and
32768 (32k). Valid sizes for version 2 logs also include 32768 (32k). Valid sizes for version 2 logs also include
65536 (64k), 131072 (128k) and 262144 (256k). 65536 (64k), 131072 (128k) and 262144 (256k).
The default value for machines with more than 32MB of memory The default value for machines with more than 32MiB of memory
is 32768, machines with less memory use 16384 by default. is 32768, machines with less memory use 16384 by default.
logdev=device and rtdev=device logdev=device and rtdev=device
...@@ -62,6 +109,11 @@ When mounting an XFS filesystem, the following options are accepted. ...@@ -62,6 +109,11 @@ When mounting an XFS filesystem, the following options are accepted.
optional, and the log section can be separate from the data optional, and the log section can be separate from the data
section or contained within it. section or contained within it.
mtpt=mountpoint
Use with the "dmapi" option. The value specified here will be
included in the DMAPI mount event, and should be the path of
the actual mountpoint that is used.
noalign noalign
Data allocations will not be aligned at stripe unit boundaries. Data allocations will not be aligned at stripe unit boundaries.
...@@ -91,13 +143,17 @@ When mounting an XFS filesystem, the following options are accepted. ...@@ -91,13 +143,17 @@ When mounting an XFS filesystem, the following options are accepted.
O_SYNC writes can be lost if the system crashes. O_SYNC writes can be lost if the system crashes.
If timestamp updates are critical, use the osyncisosync option. If timestamp updates are critical, use the osyncisosync option.
quota/usrquota/uqnoenforce uquota/usrquota/uqnoenforce/quota
User disk quota accounting enabled, and limits (optionally) User disk quota accounting enabled, and limits (optionally)
enforced. enforced. Refer to xfs_quota(8) for further details.
grpquota/gqnoenforce gquota/grpquota/gqnoenforce
Group disk quota accounting enabled and limits (optionally) Group disk quota accounting enabled and limits (optionally)
enforced. enforced. Refer to xfs_quota(8) for further details.
pquota/prjquota/pqnoenforce
Project disk quota accounting enabled and limits (optionally)
enforced. Refer to xfs_quota(8) for further details.
sunit=value and swidth=value sunit=value and swidth=value
Used to specify the stripe unit and width for a RAID device or Used to specify the stripe unit and width for a RAID device or
...@@ -113,15 +169,21 @@ When mounting an XFS filesystem, the following options are accepted. ...@@ -113,15 +169,21 @@ When mounting an XFS filesystem, the following options are accepted.
The "swidth" option is required if the "sunit" option has been The "swidth" option is required if the "sunit" option has been
specified, and must be a multiple of the "sunit" value. specified, and must be a multiple of the "sunit" value.
swalloc
Data allocations will be rounded up to stripe width boundaries
when the current end of file is being extended and the file
size is larger than the stripe width size.
sysctls sysctls
======= =======
The following sysctls are available for the XFS filesystem: The following sysctls are available for the XFS filesystem:
fs.xfs.stats_clear (Min: 0 Default: 0 Max: 1) fs.xfs.stats_clear (Min: 0 Default: 0 Max: 1)
Setting this to "1" clears accumulated XFS statistics Setting this to "1" clears accumulated XFS statistics
in /proc/fs/xfs/stat. It then immediately resets to "0". in /proc/fs/xfs/stat. It then immediately resets to "0".
fs.xfs.xfssyncd_centisecs (Min: 100 Default: 3000 Max: 720000) fs.xfs.xfssyncd_centisecs (Min: 100 Default: 3000 Max: 720000)
The interval at which the xfssyncd thread flushes metadata The interval at which the xfssyncd thread flushes metadata
out to disk. This thread will flush log activity out, and out to disk. This thread will flush log activity out, and
...@@ -143,9 +205,9 @@ The following sysctls are available for the XFS filesystem: ...@@ -143,9 +205,9 @@ The following sysctls are available for the XFS filesystem:
XFS_ERRLEVEL_HIGH: 5 XFS_ERRLEVEL_HIGH: 5
fs.xfs.panic_mask (Min: 0 Default: 0 Max: 127) fs.xfs.panic_mask (Min: 0 Default: 0 Max: 127)
Causes certain error conditions to call BUG(). Value is a bitmask; Causes certain error conditions to call BUG(). Value is a bitmask;
AND together the tags which represent errors which should cause panics: AND together the tags which represent errors which should cause panics:
XFS_NO_PTAG 0 XFS_NO_PTAG 0
XFS_PTAG_IFLUSH 0x00000001 XFS_PTAG_IFLUSH 0x00000001
XFS_PTAG_LOGRES 0x00000002 XFS_PTAG_LOGRES 0x00000002
...@@ -155,7 +217,7 @@ The following sysctls are available for the XFS filesystem: ...@@ -155,7 +217,7 @@ The following sysctls are available for the XFS filesystem:
XFS_PTAG_SHUTDOWN_IOERROR 0x00000020 XFS_PTAG_SHUTDOWN_IOERROR 0x00000020
XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040 XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040
This option is intended for debugging only. This option is intended for debugging only.
fs.xfs.irix_symlink_mode (Min: 0 Default: 0 Max: 1) fs.xfs.irix_symlink_mode (Min: 0 Default: 0 Max: 1)
Controls whether symlinks are created with mode 0777 (default) Controls whether symlinks are created with mode 0777 (default)
...@@ -164,25 +226,37 @@ The following sysctls are available for the XFS filesystem: ...@@ -164,25 +226,37 @@ The following sysctls are available for the XFS filesystem:
fs.xfs.irix_sgid_inherit (Min: 0 Default: 0 Max: 1) fs.xfs.irix_sgid_inherit (Min: 0 Default: 0 Max: 1)
Controls files created in SGID directories. Controls files created in SGID directories.
If the group ID of the new file does not match the effective group If the group ID of the new file does not match the effective group
ID or one of the supplementary group IDs of the parent dir, the ID or one of the supplementary group IDs of the parent dir, the
ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
is set. is set.
fs.xfs.restrict_chown (Min: 0 Default: 1 Max: 1) fs.xfs.restrict_chown (Min: 0 Default: 1 Max: 1)
Controls whether unprivileged users can use chown to "give away" Controls whether unprivileged users can use chown to "give away"
a file to another user. a file to another user.
fs.xfs.inherit_sync (Min: 0 Default: 1 Max 1) fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1)
Setting this to "1" will cause the "sync" flag set Setting this to "1" will cause the "sync" flag set
by the chattr(1) command on a directory to be by the xfs_io(8) chattr command on a directory to be
inherited by files in that directory. inherited by files in that directory.
fs.xfs.inherit_nodump (Min: 0 Default: 1 Max 1) fs.xfs.inherit_nodump (Min: 0 Default: 1 Max: 1)
Setting this to "1" will cause the "nodump" flag set Setting this to "1" will cause the "nodump" flag set
by the chattr(1) command on a directory to be by the xfs_io(8) chattr command on a directory to be
inherited by files in that directory. inherited by files in that directory.
fs.xfs.inherit_noatime (Min: 0 Default: 1 Max 1) fs.xfs.inherit_noatime (Min: 0 Default: 1 Max: 1)
Setting this to "1" will cause the "noatime" flag set Setting this to "1" will cause the "noatime" flag set
by the chattr(1) command on a directory to be by the xfs_io(8) chattr command on a directory to be
inherited by files in that directory. inherited by files in that directory.
fs.xfs.inherit_nosymlinks (Min: 0 Default: 1 Max: 1)
Setting this to "1" will cause the "nosymlinks" flag set
by the xfs_io(8) chattr command on a directory to be
inherited by files in that directory.
fs.xfs.rotorstep (Min: 1 Default: 1 Max: 256)
In "inode32" allocation mode, this option determines how many
files the allocator attempts to allocate in the same allocation
group before moving to the next allocation group. The intent
is to control the rate at which the allocator moves between
allocation groups when allocating extents for new files.
...@@ -118,6 +118,10 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i ...@@ -118,6 +118,10 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i
if (!sb->s_qcop->get_xquota) if (!sb->s_qcop->get_xquota)
return -ENOSYS; return -ENOSYS;
break; break;
case Q_XQUOTASYNC:
if (!sb->s_qcop->quota_sync)
return -ENOSYS;
break;
default: default:
return -EINVAL; return -EINVAL;
} }
...@@ -128,7 +132,7 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i ...@@ -128,7 +132,7 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i
(type == XQM_GRPQUOTA && !in_egroup_p(id))) && (type == XQM_GRPQUOTA && !in_egroup_p(id))) &&
!capable(CAP_SYS_ADMIN)) !capable(CAP_SYS_ADMIN))
return -EPERM; return -EPERM;
} else if (cmd != Q_XGETQSTAT) { } else if (cmd != Q_XGETQSTAT && cmd != Q_XQUOTASYNC) {
if (!capable(CAP_SYS_ADMIN)) if (!capable(CAP_SYS_ADMIN))
return -EPERM; return -EPERM;
} }
...@@ -322,6 +326,8 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, void ...@@ -322,6 +326,8 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, void
return -EFAULT; return -EFAULT;
return 0; return 0;
} }
case Q_XQUOTASYNC:
return sb->s_qcop->quota_sync(sb, type);
/* We never reach here unless validity check is broken */ /* We never reach here unless validity check is broken */
default: default:
BUG(); BUG();
......
...@@ -24,7 +24,7 @@ config XFS_EXPORT ...@@ -24,7 +24,7 @@ config XFS_EXPORT
default y default y
config XFS_QUOTA config XFS_QUOTA
tristate "XFS Quota support" bool "XFS Quota support"
depends on XFS_FS depends on XFS_FS
help help
If you say Y here, you will be able to set limits for disk usage on If you say Y here, you will be able to set limits for disk usage on
......
...@@ -109,7 +109,6 @@ xfs-y += xfs_alloc.o \ ...@@ -109,7 +109,6 @@ xfs-y += xfs_alloc.o \
xfs_dfrag.o \ xfs_dfrag.o \
xfs_log.o \ xfs_log.o \
xfs_log_recover.o \ xfs_log_recover.o \
xfs_macros.o \
xfs_mount.o \ xfs_mount.o \
xfs_rename.o \ xfs_rename.o \
xfs_trans.o \ xfs_trans.o \
......
/* /*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/swap.h> #include <linux/swap.h>
#include <linux/blkdev.h> #include <linux/blkdev.h>
#include "time.h" #include "time.h"
#include "kmem.h" #include "kmem.h"
#define MAX_VMALLOCS 6 #define MAX_VMALLOCS 6
#define MAX_SLAB_SIZE 0x20000 #define MAX_SLAB_SIZE 0x20000
void * void *
kmem_alloc(size_t size, unsigned int __nocast flags) kmem_alloc(size_t size, unsigned int __nocast flags)
{ {
......
/* /*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_SUPPORT_KMEM_H__ #ifndef __XFS_SUPPORT_KMEM_H__
#define __XFS_SUPPORT_KMEM_H__ #define __XFS_SUPPORT_KMEM_H__
...@@ -83,7 +69,7 @@ typedef unsigned long xfs_pflags_t; ...@@ -83,7 +69,7 @@ typedef unsigned long xfs_pflags_t;
static __inline gfp_t kmem_flags_convert(unsigned int __nocast flags) static __inline gfp_t kmem_flags_convert(unsigned int __nocast flags)
{ {
gfp_t lflags = __GFP_NOWARN; /* we'll report problems, if need be */ gfp_t lflags = __GFP_NOWARN; /* we'll report problems, if need be */
#ifdef DEBUG #ifdef DEBUG
if (unlikely(flags & ~(KM_SLEEP|KM_NOSLEEP|KM_NOFS|KM_MAYFAIL))) { if (unlikely(flags & ~(KM_SLEEP|KM_NOSLEEP|KM_NOFS|KM_MAYFAIL))) {
...@@ -102,7 +88,7 @@ static __inline gfp_t kmem_flags_convert(unsigned int __nocast flags) ...@@ -102,7 +88,7 @@ static __inline gfp_t kmem_flags_convert(unsigned int __nocast flags)
if (PFLAGS_TEST_FSTRANS() || (flags & KM_NOFS)) if (PFLAGS_TEST_FSTRANS() || (flags & KM_NOFS))
lflags &= ~__GFP_FS; lflags &= ~__GFP_FS;
} }
return lflags; return lflags;
} }
...@@ -125,13 +111,13 @@ kmem_zone_destroy(kmem_zone_t *zone) ...@@ -125,13 +111,13 @@ kmem_zone_destroy(kmem_zone_t *zone)
BUG(); BUG();
} }
extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast); extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast);
extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast); extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast);
extern void *kmem_alloc(size_t, unsigned int __nocast); extern void *kmem_alloc(size_t, unsigned int __nocast);
extern void *kmem_realloc(void *, size_t, size_t, unsigned int __nocast); extern void *kmem_realloc(void *, size_t, size_t, unsigned int __nocast);
extern void *kmem_zalloc(size_t, unsigned int __nocast); extern void *kmem_zalloc(size_t, unsigned int __nocast);
extern void kmem_free(void *, size_t); extern void kmem_free(void *, size_t);
typedef struct shrinker *kmem_shaker_t; typedef struct shrinker *kmem_shaker_t;
typedef int (*kmem_shake_func_t)(int, gfp_t); typedef int (*kmem_shake_func_t)(int, gfp_t);
......
/* /*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_SUPPORT_MRLOCK_H__ #ifndef __XFS_SUPPORT_MRLOCK_H__
#define __XFS_SUPPORT_MRLOCK_H__ #define __XFS_SUPPORT_MRLOCK_H__
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_SUPPORT_MUTEX_H__ #ifndef __XFS_SUPPORT_MUTEX_H__
#define __XFS_SUPPORT_MUTEX_H__ #define __XFS_SUPPORT_MUTEX_H__
......
/* /*
* Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_SUPPORT_SEMA_H__ #ifndef __XFS_SUPPORT_SEMA_H__
#define __XFS_SUPPORT_SEMA_H__ #define __XFS_SUPPORT_SEMA_H__
......
/* /*
* Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_SUPPORT_SPIN_H__ #ifndef __XFS_SUPPORT_SPIN_H__
#define __XFS_SUPPORT_SPIN_H__ #define __XFS_SUPPORT_SPIN_H__
......
/* /*
* Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_SUPPORT_SV_H__ #ifndef __XFS_SUPPORT_SV_H__
#define __XFS_SUPPORT_SV_H__ #define __XFS_SUPPORT_SV_H__
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_SUPPORT_TIME_H__ #ifndef __XFS_SUPPORT_TIME_H__
#define __XFS_SUPPORT_TIME_H__ #define __XFS_SUPPORT_TIME_H__
......
/* /*
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_inum.h" #include "xfs_bit.h"
#include "xfs_log.h" #include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_sb.h" #include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_dir.h" #include "xfs_dir.h"
#include "xfs_dir2.h" #include "xfs_dir2.h"
#include "xfs_trans.h" #include "xfs_trans.h"
...@@ -42,13 +29,13 @@ ...@@ -42,13 +29,13 @@
#include "xfs_bmap_btree.h" #include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h" #include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h" #include "xfs_ialloc_btree.h"
#include "xfs_alloc.h"
#include "xfs_btree.h"
#include "xfs_attr_sf.h"
#include "xfs_dir_sf.h" #include "xfs_dir_sf.h"
#include "xfs_dir2_sf.h" #include "xfs_dir2_sf.h"
#include "xfs_attr_sf.h"
#include "xfs_dinode.h" #include "xfs_dinode.h"
#include "xfs_inode.h" #include "xfs_inode.h"
#include "xfs_alloc.h"
#include "xfs_btree.h"
#include "xfs_error.h" #include "xfs_error.h"
#include "xfs_rw.h" #include "xfs_rw.h"
#include "xfs_iomap.h" #include "xfs_iomap.h"
...@@ -761,8 +748,9 @@ xfs_page_state_convert( ...@@ -761,8 +748,9 @@ xfs_page_state_convert(
if (page->index >= end_index) { if (page->index >= end_index) {
if ((page->index >= end_index + 1) || if ((page->index >= end_index + 1) ||
!(i_size_read(inode) & (PAGE_CACHE_SIZE - 1))) { !(i_size_read(inode) & (PAGE_CACHE_SIZE - 1))) {
err = -EIO; if (startio)
goto error; unlock_page(page);
return 0;
} }
} }
...@@ -948,15 +936,18 @@ __linvfs_get_block( ...@@ -948,15 +936,18 @@ __linvfs_get_block(
{ {
vnode_t *vp = LINVFS_GET_VP(inode); vnode_t *vp = LINVFS_GET_VP(inode);
xfs_iomap_t iomap; xfs_iomap_t iomap;
xfs_off_t offset;
ssize_t size;
int retpbbm = 1; int retpbbm = 1;
int error; int error;
ssize_t size;
loff_t offset = (loff_t)iblock << inode->i_blkbits;
if (blocks) if (blocks) {
size = blocks << inode->i_blkbits; offset = blocks << inode->i_blkbits; /* 64 bit goodness */
else size = (ssize_t) min_t(xfs_off_t, offset, LONG_MAX);
} else {
size = 1 << inode->i_blkbits; size = 1 << inode->i_blkbits;
}
offset = (xfs_off_t)iblock << inode->i_blkbits;
VOP_BMAP(vp, offset, size, VOP_BMAP(vp, offset, size,
create ? flags : BMAPI_READ, &iomap, &retpbbm, error); create ? flags : BMAPI_READ, &iomap, &retpbbm, error);
...@@ -967,8 +958,8 @@ __linvfs_get_block( ...@@ -967,8 +958,8 @@ __linvfs_get_block(
return 0; return 0;
if (iomap.iomap_bn != IOMAP_DADDR_NULL) { if (iomap.iomap_bn != IOMAP_DADDR_NULL) {
xfs_daddr_t bn; xfs_daddr_t bn;
loff_t delta; xfs_off_t delta;
/* For unwritten extents do not report a disk address on /* For unwritten extents do not report a disk address on
* the read case (treat as if we're reading into a hole). * the read case (treat as if we're reading into a hole).
...@@ -1000,9 +991,8 @@ __linvfs_get_block( ...@@ -1000,9 +991,8 @@ __linvfs_get_block(
*/ */
if (create && if (create &&
((!buffer_mapped(bh_result) && !buffer_uptodate(bh_result)) || ((!buffer_mapped(bh_result) && !buffer_uptodate(bh_result)) ||
(offset >= i_size_read(inode)) || (iomap.iomap_flags & IOMAP_NEW))) { (offset >= i_size_read(inode)) || (iomap.iomap_flags & IOMAP_NEW)))
set_buffer_new(bh_result); set_buffer_new(bh_result);
}
if (iomap.iomap_flags & IOMAP_DELAY) { if (iomap.iomap_flags & IOMAP_DELAY) {
BUG_ON(direct); BUG_ON(direct);
...@@ -1014,9 +1004,11 @@ __linvfs_get_block( ...@@ -1014,9 +1004,11 @@ __linvfs_get_block(
} }
if (blocks) { if (blocks) {
bh_result->b_size = (ssize_t)min( ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0);
(loff_t)(iomap.iomap_bsize - iomap.iomap_delta), offset = min_t(xfs_off_t,
(loff_t)(blocks << inode->i_blkbits)); iomap.iomap_bsize - iomap.iomap_delta,
blocks << inode->i_blkbits);
bh_result->b_size = (u32) min_t(xfs_off_t, UINT_MAX, offset);
} }
return 0; return 0;
......
/* /*
* Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_AOPS_H__ #ifndef __XFS_AOPS_H__
#define __XFS_AOPS_H__ #define __XFS_AOPS_H__
......
This diff is collapsed.
/* /*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
/*
* Written by Steve Lord, Jim Mostek, Russell Cattelan at SGI
*/
#ifndef __XFS_BUF_H__ #ifndef __XFS_BUF_H__
#define __XFS_BUF_H__ #define __XFS_BUF_H__
...@@ -69,15 +50,12 @@ typedef enum page_buf_flags_e { /* pb_flags values */ ...@@ -69,15 +50,12 @@ typedef enum page_buf_flags_e { /* pb_flags values */
PBF_READ = (1 << 0), /* buffer intended for reading from device */ PBF_READ = (1 << 0), /* buffer intended for reading from device */
PBF_WRITE = (1 << 1), /* buffer intended for writing to device */ PBF_WRITE = (1 << 1), /* buffer intended for writing to device */
PBF_MAPPED = (1 << 2), /* buffer mapped (pb_addr valid) */ PBF_MAPPED = (1 << 2), /* buffer mapped (pb_addr valid) */
PBF_PARTIAL = (1 << 3), /* buffer partially read */
PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */ PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */
PBF_NONE = (1 << 5), /* buffer not read at all */ PBF_DONE = (1 << 5), /* all pages in the buffer uptodate */
PBF_DELWRI = (1 << 6), /* buffer has dirty pages */ PBF_DELWRI = (1 << 6), /* buffer has dirty pages */
PBF_STALE = (1 << 7), /* buffer has been staled, do not find it */ PBF_STALE = (1 << 7), /* buffer has been staled, do not find it */
PBF_FS_MANAGED = (1 << 8), /* filesystem controls freeing memory */ PBF_FS_MANAGED = (1 << 8), /* filesystem controls freeing memory */
PBF_FS_DATAIOD = (1 << 9), /* schedule IO completion on fs datad */ PBF_ORDERED = (1 << 11), /* use ordered writes */
PBF_FORCEIO = (1 << 10), /* ignore any cache state */
PBF_FLUSH = (1 << 11), /* flush disk write cache */
PBF_READ_AHEAD = (1 << 12), /* asynchronous read-ahead */ PBF_READ_AHEAD = (1 << 12), /* asynchronous read-ahead */
/* flags used only as arguments to access routines */ /* flags used only as arguments to access routines */
...@@ -92,9 +70,6 @@ typedef enum page_buf_flags_e { /* pb_flags values */ ...@@ -92,9 +70,6 @@ typedef enum page_buf_flags_e { /* pb_flags values */
_PBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */ _PBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */
} page_buf_flags_t; } page_buf_flags_t;
#define PBF_UPDATE (PBF_READ | PBF_WRITE)
#define PBF_NOT_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) != 0)
#define PBF_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) == 0)
typedef struct xfs_bufhash { typedef struct xfs_bufhash {
struct list_head bh_list; struct list_head bh_list;
...@@ -258,7 +233,6 @@ extern void pagebuf_unlock( /* unlock buffer */ ...@@ -258,7 +233,6 @@ extern void pagebuf_unlock( /* unlock buffer */
extern void pagebuf_iodone( /* mark buffer I/O complete */ extern void pagebuf_iodone( /* mark buffer I/O complete */
xfs_buf_t *, /* buffer to mark */ xfs_buf_t *, /* buffer to mark */
int, /* use data/log helper thread. */
int); /* run completion locally, or in int); /* run completion locally, or in
* a helper thread. */ * a helper thread. */
...@@ -378,21 +352,21 @@ extern void pagebuf_trace( ...@@ -378,21 +352,21 @@ extern void pagebuf_trace(
#define XFS_BUF_GETERROR(x) pagebuf_geterror(x) #define XFS_BUF_GETERROR(x) pagebuf_geterror(x)
#define XFS_BUF_ISERROR(x) (pagebuf_geterror(x)?1:0) #define XFS_BUF_ISERROR(x) (pagebuf_geterror(x)?1:0)
#define XFS_BUF_DONE(x) ((x)->pb_flags &= ~(PBF_PARTIAL|PBF_NONE)) #define XFS_BUF_DONE(x) ((x)->pb_flags |= PBF_DONE)
#define XFS_BUF_UNDONE(x) ((x)->pb_flags |= PBF_PARTIAL|PBF_NONE) #define XFS_BUF_UNDONE(x) ((x)->pb_flags &= ~PBF_DONE)
#define XFS_BUF_ISDONE(x) (!(PBF_NOT_DONE(x))) #define XFS_BUF_ISDONE(x) ((x)->pb_flags & PBF_DONE)
#define XFS_BUF_BUSY(x) ((x)->pb_flags |= PBF_FORCEIO) #define XFS_BUF_BUSY(x) do { } while (0)
#define XFS_BUF_UNBUSY(x) ((x)->pb_flags &= ~PBF_FORCEIO) #define XFS_BUF_UNBUSY(x) do { } while (0)
#define XFS_BUF_ISBUSY(x) (1) #define XFS_BUF_ISBUSY(x) (1)
#define XFS_BUF_ASYNC(x) ((x)->pb_flags |= PBF_ASYNC) #define XFS_BUF_ASYNC(x) ((x)->pb_flags |= PBF_ASYNC)
#define XFS_BUF_UNASYNC(x) ((x)->pb_flags &= ~PBF_ASYNC) #define XFS_BUF_UNASYNC(x) ((x)->pb_flags &= ~PBF_ASYNC)
#define XFS_BUF_ISASYNC(x) ((x)->pb_flags & PBF_ASYNC) #define XFS_BUF_ISASYNC(x) ((x)->pb_flags & PBF_ASYNC)
#define XFS_BUF_FLUSH(x) ((x)->pb_flags |= PBF_FLUSH) #define XFS_BUF_ORDERED(x) ((x)->pb_flags |= PBF_ORDERED)
#define XFS_BUF_UNFLUSH(x) ((x)->pb_flags &= ~PBF_FLUSH) #define XFS_BUF_UNORDERED(x) ((x)->pb_flags &= ~PBF_ORDERED)
#define XFS_BUF_ISFLUSH(x) ((x)->pb_flags & PBF_FLUSH) #define XFS_BUF_ISORDERED(x) ((x)->pb_flags & PBF_ORDERED)
#define XFS_BUF_SHUT(x) printk("XFS_BUF_SHUT not implemented yet\n") #define XFS_BUF_SHUT(x) printk("XFS_BUF_SHUT not implemented yet\n")
#define XFS_BUF_UNSHUT(x) printk("XFS_BUF_UNSHUT not implemented yet\n") #define XFS_BUF_UNSHUT(x) printk("XFS_BUF_UNSHUT not implemented yet\n")
...@@ -412,9 +386,6 @@ extern void pagebuf_trace( ...@@ -412,9 +386,6 @@ extern void pagebuf_trace(
#define XFS_BUF_BP_ISMAPPED(bp) 1 #define XFS_BUF_BP_ISMAPPED(bp) 1
#define XFS_BUF_DATAIO(x) ((x)->pb_flags |= PBF_FS_DATAIOD)
#define XFS_BUF_UNDATAIO(x) ((x)->pb_flags &= ~PBF_FS_DATAIOD)
#define XFS_BUF_IODONE_FUNC(buf) (buf)->pb_iodone #define XFS_BUF_IODONE_FUNC(buf) (buf)->pb_iodone
#define XFS_BUF_SET_IODONE_FUNC(buf, func) \ #define XFS_BUF_SET_IODONE_FUNC(buf, func) \
(buf)->pb_iodone = (func) (buf)->pb_iodone = (func)
...@@ -510,7 +481,7 @@ static inline void xfs_buf_relse(xfs_buf_t *bp) ...@@ -510,7 +481,7 @@ static inline void xfs_buf_relse(xfs_buf_t *bp)
pagebuf_trace(bp, id, NULL, (void *)__builtin_return_address(0)) pagebuf_trace(bp, id, NULL, (void *)__builtin_return_address(0))
#define xfs_biodone(pb) \ #define xfs_biodone(pb) \
pagebuf_iodone(pb, (pb->pb_flags & PBF_FS_DATAIOD), 0) pagebuf_iodone(pb, 0)
#define xfs_biomove(pb, off, len, data, rw) \ #define xfs_biomove(pb, off, len, data, rw) \
pagebuf_iomove((pb), (off), (len), (data), \ pagebuf_iomove((pb), (off), (len), (data), \
......
/* /*
* Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_CRED_H__ #ifndef __XFS_CRED_H__
#define __XFS_CRED_H__ #define __XFS_CRED_H__
......
/* /*
* Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2004-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_types.h" #include "xfs_types.h"
#include "xfs_dmapi.h" #include "xfs_dmapi.h"
...@@ -41,7 +26,7 @@ ...@@ -41,7 +26,7 @@
#include "xfs_export.h" #include "xfs_export.h"
/* /*
* XFS encode and decodes the fileid portion of NFS filehandles * XFS encodes and decodes the fileid portion of NFS filehandles
* itself instead of letting the generic NFS code do it. This * itself instead of letting the generic NFS code do it. This
* allows filesystems with 64 bit inode numbers to be exported. * allows filesystems with 64 bit inode numbers to be exported.
* *
...@@ -51,7 +36,6 @@ ...@@ -51,7 +36,6 @@
* remains in that code. * remains in that code.
*/ */
STATIC struct dentry * STATIC struct dentry *
linvfs_decode_fh( linvfs_decode_fh(
struct super_block *sb, struct super_block *sb,
...@@ -92,7 +76,7 @@ linvfs_decode_fh( ...@@ -92,7 +76,7 @@ linvfs_decode_fh(
p = xfs_fileid_decode_fid2(p, &pfid, is64); p = xfs_fileid_decode_fid2(p, &pfid, is64);
parent = &pfid; parent = &pfid;
} }
fh = (__u32 *)&ifid; fh = (__u32 *)&ifid;
return find_exported_dentry(sb, fh, parent, acceptable, context); return find_exported_dentry(sb, fh, parent, acceptable, context);
} }
...@@ -112,9 +96,8 @@ linvfs_encode_fh( ...@@ -112,9 +96,8 @@ linvfs_encode_fh(
int is64 = 0; int is64 = 0;
#if XFS_BIG_INUMS #if XFS_BIG_INUMS
vfs_t *vfs = LINVFS_GET_VFS(inode->i_sb); vfs_t *vfs = LINVFS_GET_VFS(inode->i_sb);
xfs_mount_t *mp = XFS_VFSTOM(vfs);
if (!(vfs->vfs_flag & VFS_32BITINODES)) {
if (!(mp->m_flags & XFS_MOUNT_32BITINOOPT)) {
/* filesystem may contain 64bit inode numbers */ /* filesystem may contain 64bit inode numbers */
is64 = XFS_FILEID_TYPE_64FLAG; is64 = XFS_FILEID_TYPE_64FLAG;
} }
......
/* /*
* Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_EXPORT_H__ #ifndef __XFS_EXPORT_H__
#define __XFS_EXPORT_H__ #define __XFS_EXPORT_H__
......
/* /*
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_inum.h" #include "xfs_bit.h"
#include "xfs_log.h" #include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_sb.h" #include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_dir.h" #include "xfs_dir.h"
#include "xfs_dir2.h" #include "xfs_dir2.h"
#include "xfs_trans.h" #include "xfs_trans.h"
......
/* /*
* Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
...@@ -117,6 +103,8 @@ fs_flush_pages( ...@@ -117,6 +103,8 @@ fs_flush_pages(
if (VN_CACHED(vp)) { if (VN_CACHED(vp)) {
filemap_fdatawrite(ip->i_mapping); filemap_fdatawrite(ip->i_mapping);
if (flags & XFS_B_ASYNC)
return 0;
filemap_fdatawait(ip->i_mapping); filemap_fdatawait(ip->i_mapping);
} }
......
/* /*
* Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000,2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_SUBR_H__
#define __XFS_SUBR_H__
/*
* Utilities shared among file system implementations.
*/ */
#ifndef __XFS_FS_SUBR_H__
#define __XFS_FS_SUBR_H__
struct cred; struct cred;
extern int fs_noerr(void);
extern int fs_noerr(void); extern int fs_nosys(void);
extern int fs_nosys(void); extern void fs_noval(void);
extern void fs_noval(void); extern void fs_tosspages(bhv_desc_t *, xfs_off_t, xfs_off_t, int);
extern void fs_tosspages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); extern void fs_flushinval_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, int);
extern void fs_flushinval_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); extern int fs_flush_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, uint64_t, int);
extern int fs_flush_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, uint64_t, int);
#endif /* __XFS_FS_SUBR_H__ */ #endif /* __XFS_FS_SUBR_H__ */
/* /*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
/*
* This file contains globals needed by XFS that were normally defined
* somewhere else in IRIX.
*/
#include "xfs.h" #include "xfs.h"
#include "xfs_cred.h" #include "xfs_cred.h"
#include "xfs_sysctl.h" #include "xfs_sysctl.h"
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_GLOBALS_H__ #ifndef __XFS_GLOBALS_H__
#define __XFS_GLOBALS_H__ #define __XFS_GLOBALS_H__
/*
* This file declares globals needed by XFS that were normally defined
* somewhere else in IRIX.
*/
extern uint64_t xfs_panic_mask; /* set to cause more panics */ extern uint64_t xfs_panic_mask; /* set to cause more panics */
extern unsigned long xfs_physmem; extern unsigned long xfs_physmem;
extern struct cred *sys_cred; extern struct cred *sys_cred;
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_fs.h" #include "xfs_fs.h"
#include "xfs_inum.h" #include "xfs_bit.h"
#include "xfs_log.h" #include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h" #include "xfs_trans.h"
#include "xfs_sb.h" #include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_dir.h" #include "xfs_dir.h"
#include "xfs_dir2.h" #include "xfs_dir2.h"
#include "xfs_alloc.h" #include "xfs_alloc.h"
#include "xfs_dmapi.h" #include "xfs_dmapi.h"
#include "xfs_mount.h" #include "xfs_mount.h"
#include "xfs_alloc_btree.h"
#include "xfs_bmap_btree.h" #include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h" #include "xfs_ialloc_btree.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_attr_sf.h"
#include "xfs_dir_sf.h" #include "xfs_dir_sf.h"
#include "xfs_attr_sf.h"
#include "xfs_dir2_sf.h" #include "xfs_dir2_sf.h"
#include "xfs_dinode.h" #include "xfs_dinode.h"
#include "xfs_inode.h" #include "xfs_inode.h"
#include "xfs_bmap.h" #include "xfs_btree.h"
#include "xfs_bit.h" #include "xfs_ialloc.h"
#include "xfs_rtalloc.h" #include "xfs_rtalloc.h"
#include "xfs_error.h"
#include "xfs_itable.h" #include "xfs_itable.h"
#include "xfs_error.h"
#include "xfs_rw.h" #include "xfs_rw.h"
#include "xfs_acl.h" #include "xfs_acl.h"
#include "xfs_cap.h" #include "xfs_cap.h"
#include "xfs_mac.h" #include "xfs_mac.h"
#include "xfs_attr.h" #include "xfs_attr.h"
#include "xfs_bmap.h"
#include "xfs_buf_item.h" #include "xfs_buf_item.h"
#include "xfs_utils.h" #include "xfs_utils.h"
#include "xfs_dfrag.h" #include "xfs_dfrag.h"
......
/* /*
* Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2004-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/compat.h> #include <linux/compat.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -39,7 +24,6 @@ ...@@ -39,7 +24,6 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include "xfs.h" #include "xfs.h"
#include "xfs_types.h" #include "xfs_types.h"
#include "xfs_fs.h" #include "xfs_fs.h"
......
/* /*
* Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2004-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_IOCTL32_H__
#define __XFS_IOCTL32_H__
extern long linvfs_compat_ioctl(struct file *, unsigned, unsigned long);
extern long linvfs_compat_invis_ioctl(struct file *f, unsigned, unsigned long);
long linvfs_compat_ioctl(struct file *f, unsigned cmd, unsigned long arg); #endif /* __XFS_IOCTL32_H__ */
long linvfs_compat_invis_ioctl(struct file *f, unsigned cmd, unsigned long arg);
/* /*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_fs.h" #include "xfs_fs.h"
#include "xfs_inum.h" #include "xfs_bit.h"
#include "xfs_log.h" #include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h" #include "xfs_trans.h"
#include "xfs_sb.h" #include "xfs_sb.h"
#include "xfs_ag.h" #include "xfs_ag.h"
...@@ -43,18 +29,17 @@ ...@@ -43,18 +29,17 @@
#include "xfs_dmapi.h" #include "xfs_dmapi.h"
#include "xfs_quota.h" #include "xfs_quota.h"
#include "xfs_mount.h" #include "xfs_mount.h"
#include "xfs_alloc_btree.h"
#include "xfs_bmap_btree.h" #include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h" #include "xfs_ialloc_btree.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_attr_sf.h"
#include "xfs_dir_sf.h" #include "xfs_dir_sf.h"
#include "xfs_dir2_sf.h" #include "xfs_dir2_sf.h"
#include "xfs_attr_sf.h"
#include "xfs_dinode.h" #include "xfs_dinode.h"
#include "xfs_inode.h" #include "xfs_inode.h"
#include "xfs_bmap.h" #include "xfs_bmap.h"
#include "xfs_bit.h" #include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_rtalloc.h" #include "xfs_rtalloc.h"
#include "xfs_error.h" #include "xfs_error.h"
#include "xfs_itable.h" #include "xfs_itable.h"
...@@ -69,6 +54,137 @@ ...@@ -69,6 +54,137 @@
#include <linux/xattr.h> #include <linux/xattr.h>
#include <linux/namei.h> #include <linux/namei.h>
/*
* Change the requested timestamp in the given inode.
* We don't lock across timestamp updates, and we don't log them but
* we do record the fact that there is dirty information in core.
*
* NOTE -- callers MUST combine XFS_ICHGTIME_MOD or XFS_ICHGTIME_CHG
* with XFS_ICHGTIME_ACC to be sure that access time
* update will take. Calling first with XFS_ICHGTIME_ACC
* and then XFS_ICHGTIME_MOD may fail to modify the access
* timestamp if the filesystem is mounted noacctm.
*/
void
xfs_ichgtime(
xfs_inode_t *ip,
int flags)
{
struct inode *inode = LINVFS_GET_IP(XFS_ITOV(ip));
timespec_t tv;
/*
* We're not supposed to change timestamps in readonly-mounted
* filesystems. Throw it away if anyone asks us.
*/
if (unlikely(IS_RDONLY(inode)))
return;
/*
* Don't update access timestamps on reads if mounted "noatime".
* Throw it away if anyone asks us.
*/
if (unlikely(
(ip->i_mount->m_flags & XFS_MOUNT_NOATIME || IS_NOATIME(inode)) &&
(flags & (XFS_ICHGTIME_ACC|XFS_ICHGTIME_MOD|XFS_ICHGTIME_CHG)) ==
XFS_ICHGTIME_ACC))
return;
nanotime(&tv);
if (flags & XFS_ICHGTIME_MOD) {
inode->i_mtime = tv;
ip->i_d.di_mtime.t_sec = (__int32_t)tv.tv_sec;
ip->i_d.di_mtime.t_nsec = (__int32_t)tv.tv_nsec;
}
if (flags & XFS_ICHGTIME_ACC) {
inode->i_atime = tv;
ip->i_d.di_atime.t_sec = (__int32_t)tv.tv_sec;
ip->i_d.di_atime.t_nsec = (__int32_t)tv.tv_nsec;
}
if (flags & XFS_ICHGTIME_CHG) {
inode->i_ctime = tv;
ip->i_d.di_ctime.t_sec = (__int32_t)tv.tv_sec;
ip->i_d.di_ctime.t_nsec = (__int32_t)tv.tv_nsec;
}
/*
* We update the i_update_core field _after_ changing
* the timestamps in order to coordinate properly with
* xfs_iflush() so that we don't lose timestamp updates.
* This keeps us from having to hold the inode lock
* while doing this. We use the SYNCHRONIZE macro to
* ensure that the compiler does not reorder the update
* of i_update_core above the timestamp updates above.
*/
SYNCHRONIZE();
ip->i_update_core = 1;
if (!(inode->i_state & I_LOCK))
mark_inode_dirty_sync(inode);
}
/*
* Variant on the above which avoids querying the system clock
* in situations where we know the Linux inode timestamps have
* just been updated (and so we can update our inode cheaply).
* We also skip the readonly and noatime checks here, they are
* also catered for already.
*/
void
xfs_ichgtime_fast(
xfs_inode_t *ip,
struct inode *inode,
int flags)
{
timespec_t *tvp;
/*
* We're not supposed to change timestamps in readonly-mounted
* filesystems. Throw it away if anyone asks us.
*/
if (unlikely(IS_RDONLY(inode)))
return;
/*
* Don't update access timestamps on reads if mounted "noatime".
* Throw it away if anyone asks us.
*/
if (unlikely(
(ip->i_mount->m_flags & XFS_MOUNT_NOATIME || IS_NOATIME(inode)) &&
((flags & (XFS_ICHGTIME_ACC|XFS_ICHGTIME_MOD|XFS_ICHGTIME_CHG)) ==
XFS_ICHGTIME_ACC)))
return;
if (flags & XFS_ICHGTIME_MOD) {
tvp = &inode->i_mtime;
ip->i_d.di_mtime.t_sec = (__int32_t)tvp->tv_sec;
ip->i_d.di_mtime.t_nsec = (__int32_t)tvp->tv_nsec;
}
if (flags & XFS_ICHGTIME_ACC) {
tvp = &inode->i_atime;
ip->i_d.di_atime.t_sec = (__int32_t)tvp->tv_sec;
ip->i_d.di_atime.t_nsec = (__int32_t)tvp->tv_nsec;
}
if (flags & XFS_ICHGTIME_CHG) {
tvp = &inode->i_ctime;
ip->i_d.di_ctime.t_sec = (__int32_t)tvp->tv_sec;
ip->i_d.di_ctime.t_nsec = (__int32_t)tvp->tv_nsec;
}
/*
* We update the i_update_core field _after_ changing
* the timestamps in order to coordinate properly with
* xfs_iflush() so that we don't lose timestamp updates.
* This keeps us from having to hold the inode lock
* while doing this. We use the SYNCHRONIZE macro to
* ensure that the compiler does not reorder the update
* of i_update_core above the timestamp updates above.
*/
SYNCHRONIZE();
ip->i_update_core = 1;
if (!(inode->i_state & I_LOCK))
mark_inode_dirty_sync(inode);
}
/* /*
* Pull the link count and size up from the xfs inode to the linux inode * Pull the link count and size up from the xfs inode to the linux inode
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_IOPS_H__ #ifndef __XFS_IOPS_H__
#define __XFS_IOPS_H__ #define __XFS_IOPS_H__
...@@ -48,4 +34,8 @@ extern void linvfs_unwritten_done(struct buffer_head *, int); ...@@ -48,4 +34,8 @@ extern void linvfs_unwritten_done(struct buffer_head *, int);
extern int xfs_ioctl(struct bhv_desc *, struct inode *, struct file *, extern int xfs_ioctl(struct bhv_desc *, struct inode *, struct file *,
int, unsigned int, void __user *); int, unsigned int, void __user *);
struct xfs_inode;
extern void xfs_ichgtime(struct xfs_inode *, int);
extern void xfs_ichgtime_fast(struct xfs_inode *, struct inode *, int);
#endif /* __XFS_IOPS_H__ */ #endif /* __XFS_IOPS_H__ */
/* /*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_LINUX__ #ifndef __XFS_LINUX__
#define __XFS_LINUX__ #define __XFS_LINUX__
...@@ -197,10 +183,6 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh) ...@@ -197,10 +183,6 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh)
/* bytes to clicks */ /* bytes to clicks */
#define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT) #define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT)
#ifndef CELL_CAPABLE
#define FSC_NOTIFY_NAME_CHANGED(vp)
#endif
#ifndef ENOATTR #ifndef ENOATTR
#define ENOATTR ENODATA /* Attribute not found */ #define ENOATTR ENODATA /* Attribute not found */
#endif #endif
...@@ -235,30 +217,18 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh) ...@@ -235,30 +217,18 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh)
#define Q_XSETPQLIM XQM_CMD(10) /* set projects disk limits */ #define Q_XSETPQLIM XQM_CMD(10) /* set projects disk limits */
#define Q_XGETPQUOTA XQM_CMD(11) /* get projects disk limits */ #define Q_XGETPQUOTA XQM_CMD(11) /* get projects disk limits */
/* IRIX uses a dynamic sizing algorithm (ndquot = 200 + numprocs*2) */ #define dfltprid 0
/* we may well need to fine-tune this if it ever becomes an issue. */
#define DQUOT_MAX_HEURISTIC 1024 /* NR_DQUOTS */
#define ndquot DQUOT_MAX_HEURISTIC
/* IRIX uses the current size of the name cache to guess a good value */
/* - this isn't the same but is a good enough starting point for now. */
#define DQUOT_HASH_HEURISTIC files_stat.nr_files
/* IRIX inodes maintain the project ID also, zero this field on Linux */
#define DEFAULT_PROJID 0
#define dfltprid DEFAULT_PROJID
#define MAXPATHLEN 1024 #define MAXPATHLEN 1024
#define MIN(a,b) (min(a,b)) #define MIN(a,b) (min(a,b))
#define MAX(a,b) (max(a,b)) #define MAX(a,b) (max(a,b))
#define howmany(x, y) (((x)+((y)-1))/(y)) #define howmany(x, y) (((x)+((y)-1))/(y))
#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) #define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
#define qsort(a,n,s,fn) sort(a,n,s,fn,NULL)
/* /*
* Various platform dependent calls that don't fit anywhere else * Various platform dependent calls that don't fit anywhere else
*/ */
#define xfs_sort(a,n,s,fn) sort(a,n,s,fn,NULL)
#define xfs_stack_trace() dump_stack() #define xfs_stack_trace() dump_stack()
#define xfs_itruncate_data(ip, off) \ #define xfs_itruncate_data(ip, off) \
(-vmtruncate(LINVFS_GET_IP(XFS_ITOV(ip)), (off))) (-vmtruncate(LINVFS_GET_IP(XFS_ITOV(ip)), (off)))
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
/*
* fs/xfs/linux/xfs_lrw.c (Linux Read Write stuff)
*
*/
#include "xfs.h" #include "xfs.h"
#include "xfs_fs.h" #include "xfs_fs.h"
#include "xfs_inum.h" #include "xfs_bit.h"
#include "xfs_log.h" #include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h" #include "xfs_trans.h"
#include "xfs_sb.h" #include "xfs_sb.h"
#include "xfs_ag.h" #include "xfs_ag.h"
...@@ -48,18 +29,17 @@ ...@@ -48,18 +29,17 @@
#include "xfs_dmapi.h" #include "xfs_dmapi.h"
#include "xfs_quota.h" #include "xfs_quota.h"
#include "xfs_mount.h" #include "xfs_mount.h"
#include "xfs_alloc_btree.h"
#include "xfs_bmap_btree.h" #include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h" #include "xfs_ialloc_btree.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_attr_sf.h"
#include "xfs_dir_sf.h" #include "xfs_dir_sf.h"
#include "xfs_dir2_sf.h" #include "xfs_dir2_sf.h"
#include "xfs_attr_sf.h"
#include "xfs_dinode.h" #include "xfs_dinode.h"
#include "xfs_inode.h" #include "xfs_inode.h"
#include "xfs_bmap.h" #include "xfs_bmap.h"
#include "xfs_bit.h" #include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_rtalloc.h" #include "xfs_rtalloc.h"
#include "xfs_error.h" #include "xfs_error.h"
#include "xfs_itable.h" #include "xfs_itable.h"
...@@ -302,7 +282,7 @@ xfs_read( ...@@ -302,7 +282,7 @@ xfs_read(
xfs_iunlock(ip, XFS_IOLOCK_SHARED); xfs_iunlock(ip, XFS_IOLOCK_SHARED);
if (likely(!(ioflags & IO_INVIS))) if (likely(!(ioflags & IO_INVIS)))
xfs_ichgtime(ip, XFS_ICHGTIME_ACC); xfs_ichgtime_fast(ip, inode, XFS_ICHGTIME_ACC);
unlock_isem: unlock_isem:
if (unlikely(ioflags & IO_ISDIRECT)) if (unlikely(ioflags & IO_ISDIRECT))
...@@ -367,7 +347,7 @@ xfs_sendfile( ...@@ -367,7 +347,7 @@ xfs_sendfile(
XFS_STATS_ADD(xs_read_bytes, ret); XFS_STATS_ADD(xs_read_bytes, ret);
if (likely(!(ioflags & IO_INVIS))) if (likely(!(ioflags & IO_INVIS)))
xfs_ichgtime(ip, XFS_ICHGTIME_ACC); xfs_ichgtime_fast(ip, LINVFS_GET_IP(vp), XFS_ICHGTIME_ACC);
return ret; return ret;
} }
...@@ -732,15 +712,10 @@ xfs_write( ...@@ -732,15 +712,10 @@ xfs_write(
} }
} }
/* if (likely(!(ioflags & IO_INVIS))) {
* On Linux, generic_file_write updates the times even if
* no data is copied in so long as the write had a size.
*
* We must update xfs' times since revalidate will overcopy xfs.
*/
if (!(ioflags & IO_INVIS)) {
xfs_ichgtime(xip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
inode_update_time(inode, 1); inode_update_time(inode, 1);
xfs_ichgtime_fast(xip, inode,
XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
} }
/* /*
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_LRW_H__ #ifndef __XFS_LRW_H__
#define __XFS_LRW_H__ #define __XFS_LRW_H__
...@@ -107,9 +93,4 @@ extern ssize_t xfs_sendfile(struct bhv_desc *, struct file *, ...@@ -107,9 +93,4 @@ extern ssize_t xfs_sendfile(struct bhv_desc *, struct file *,
extern int xfs_dev_is_read_only(struct xfs_mount *, char *); extern int xfs_dev_is_read_only(struct xfs_mount *, char *);
#define XFS_FSB_TO_DB_IO(io,fsb) \
(((io)->io_flags & XFS_IOCORE_RT) ? \
XFS_FSB_TO_BB((io)->io_mount, (fsb)) : \
XFS_FSB_TO_DADDR((io)->io_mount, (fsb)))
#endif /* __XFS_LRW_H__ */ #endif /* __XFS_LRW_H__ */
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
......
/* /*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_STATS_H__ #ifndef __XFS_STATS_H__
#define __XFS_STATS_H__ #define __XFS_STATS_H__
......
/* /*
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_bit.h"
#include "xfs_inum.h"
#include "xfs_log.h" #include "xfs_log.h"
#include "xfs_clnt.h" #include "xfs_clnt.h"
#include "xfs_inum.h"
#include "xfs_trans.h" #include "xfs_trans.h"
#include "xfs_sb.h" #include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_dir.h" #include "xfs_dir.h"
#include "xfs_dir2.h" #include "xfs_dir2.h"
#include "xfs_alloc.h" #include "xfs_alloc.h"
#include "xfs_dmapi.h" #include "xfs_dmapi.h"
#include "xfs_quota.h" #include "xfs_quota.h"
#include "xfs_mount.h" #include "xfs_mount.h"
#include "xfs_alloc_btree.h"
#include "xfs_bmap_btree.h" #include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h" #include "xfs_ialloc_btree.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_attr_sf.h"
#include "xfs_dir_sf.h" #include "xfs_dir_sf.h"
#include "xfs_dir2_sf.h" #include "xfs_dir2_sf.h"
#include "xfs_attr_sf.h"
#include "xfs_dinode.h" #include "xfs_dinode.h"
#include "xfs_inode.h" #include "xfs_inode.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_bmap.h" #include "xfs_bmap.h"
#include "xfs_bit.h"
#include "xfs_rtalloc.h" #include "xfs_rtalloc.h"
#include "xfs_error.h" #include "xfs_error.h"
#include "xfs_itable.h" #include "xfs_itable.h"
...@@ -189,7 +174,7 @@ xfs_revalidate_inode( ...@@ -189,7 +174,7 @@ xfs_revalidate_inode(
break; break;
} }
inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blksize = xfs_preferred_iosize(mp);
inode->i_generation = ip->i_d.di_gen; inode->i_generation = ip->i_d.di_gen;
i_size_write(inode, ip->i_d.di_size); i_size_write(inode, ip->i_d.di_size);
inode->i_blocks = inode->i_blocks =
...@@ -278,6 +263,72 @@ xfs_blkdev_put( ...@@ -278,6 +263,72 @@ xfs_blkdev_put(
close_bdev_excl(bdev); close_bdev_excl(bdev);
} }
/*
* Try to write out the superblock using barriers.
*/
STATIC int
xfs_barrier_test(
xfs_mount_t *mp)
{
xfs_buf_t *sbp = xfs_getsb(mp, 0);
int error;
XFS_BUF_UNDONE(sbp);
XFS_BUF_UNREAD(sbp);
XFS_BUF_UNDELAYWRITE(sbp);
XFS_BUF_WRITE(sbp);
XFS_BUF_UNASYNC(sbp);
XFS_BUF_ORDERED(sbp);
xfsbdstrat(mp, sbp);
error = xfs_iowait(sbp);
/*
* Clear all the flags we set and possible error state in the
* buffer. We only did the write to try out whether barriers
* worked and shouldn't leave any traces in the superblock
* buffer.
*/
XFS_BUF_DONE(sbp);
XFS_BUF_ERROR(sbp, 0);
XFS_BUF_UNORDERED(sbp);
xfs_buf_relse(sbp);
return error;
}
void
xfs_mountfs_check_barriers(xfs_mount_t *mp)
{
int error;
if (mp->m_logdev_targp != mp->m_ddev_targp) {
xfs_fs_cmn_err(CE_NOTE, mp,
"Disabling barriers, not supported with external log device");
mp->m_flags &= ~XFS_MOUNT_BARRIER;
}
if (mp->m_ddev_targp->pbr_bdev->bd_disk->queue->ordered ==
QUEUE_ORDERED_NONE) {
xfs_fs_cmn_err(CE_NOTE, mp,
"Disabling barriers, not supported by the underlying device");
mp->m_flags &= ~XFS_MOUNT_BARRIER;
}
error = xfs_barrier_test(mp);
if (error) {
xfs_fs_cmn_err(CE_NOTE, mp,
"Disabling barriers, trial barrier write failed");
mp->m_flags &= ~XFS_MOUNT_BARRIER;
}
}
void
xfs_blkdev_issue_flush(
xfs_buftarg_t *buftarg)
{
blkdev_issue_flush(buftarg->pbr_bdev, NULL);
}
STATIC struct inode * STATIC struct inode *
linvfs_alloc_inode( linvfs_alloc_inode(
...@@ -700,6 +751,18 @@ linvfs_show_options( ...@@ -700,6 +751,18 @@ linvfs_show_options(
return error; return error;
} }
STATIC int
linvfs_quotasync(
struct super_block *sb,
int type)
{
struct vfs *vfsp = LINVFS_GET_VFS(sb);
int error;
VFS_QUOTACTL(vfsp, Q_XQUOTASYNC, 0, (caddr_t)NULL, error);
return -error;
}
STATIC int STATIC int
linvfs_getxstate( linvfs_getxstate(
struct super_block *sb, struct super_block *sb,
...@@ -868,6 +931,7 @@ STATIC struct super_operations linvfs_sops = { ...@@ -868,6 +931,7 @@ STATIC struct super_operations linvfs_sops = {
}; };
STATIC struct quotactl_ops linvfs_qops = { STATIC struct quotactl_ops linvfs_qops = {
.quota_sync = linvfs_quotasync,
.get_xstate = linvfs_getxstate, .get_xstate = linvfs_getxstate,
.set_xstate = linvfs_setxstate, .set_xstate = linvfs_setxstate,
.get_xquota = linvfs_getxquota, .get_xquota = linvfs_getxquota,
......
/* /*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_SUPER_H__ #ifndef __XFS_SUPER_H__
#define __XFS_SUPER_H__ #define __XFS_SUPER_H__
...@@ -132,6 +118,7 @@ extern void xfs_flush_device(struct xfs_inode *); ...@@ -132,6 +118,7 @@ extern void xfs_flush_device(struct xfs_inode *);
extern int xfs_blkdev_get(struct xfs_mount *, const char *, extern int xfs_blkdev_get(struct xfs_mount *, const char *,
struct block_device **); struct block_device **);
extern void xfs_blkdev_put(struct block_device *); extern void xfs_blkdev_put(struct block_device *);
extern void xfs_blkdev_issue_flush(struct xfs_buftarg *);
extern struct export_operations linvfs_export_ops; extern struct export_operations linvfs_export_ops;
......
/* /*
* Copyright (c) 2001-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2001-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_rw.h"
#include <linux/sysctl.h> #include <linux/sysctl.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
static struct ctl_table_header *xfs_table_header; static struct ctl_table_header *xfs_table_header;
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
STATIC int STATIC int
xfs_stats_clear_proc_handler( xfs_stats_clear_proc_handler(
...@@ -76,7 +58,7 @@ xfs_stats_clear_proc_handler( ...@@ -76,7 +58,7 @@ xfs_stats_clear_proc_handler(
STATIC ctl_table xfs_table[] = { STATIC ctl_table xfs_table[] = {
{XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val, {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, sizeof(int), 0644, NULL, &proc_dointvec_minmax,
&sysctl_intvec, NULL, &sysctl_intvec, NULL,
&xfs_params.restrict_chown.min, &xfs_params.restrict_chown.max}, &xfs_params.restrict_chown.min, &xfs_params.restrict_chown.max},
{XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val, {XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val,
...@@ -86,22 +68,22 @@ STATIC ctl_table xfs_table[] = { ...@@ -86,22 +68,22 @@ STATIC ctl_table xfs_table[] = {
{XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val, {XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, sizeof(int), 0644, NULL, &proc_dointvec_minmax,
&sysctl_intvec, NULL, &sysctl_intvec, NULL,
&xfs_params.symlink_mode.min, &xfs_params.symlink_mode.max}, &xfs_params.symlink_mode.min, &xfs_params.symlink_mode.max},
{XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val, {XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, sizeof(int), 0644, NULL, &proc_dointvec_minmax,
&sysctl_intvec, NULL, &sysctl_intvec, NULL,
&xfs_params.panic_mask.min, &xfs_params.panic_mask.max}, &xfs_params.panic_mask.min, &xfs_params.panic_mask.max},
{XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val, {XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, sizeof(int), 0644, NULL, &proc_dointvec_minmax,
&sysctl_intvec, NULL, &sysctl_intvec, NULL,
&xfs_params.error_level.min, &xfs_params.error_level.max}, &xfs_params.error_level.min, &xfs_params.error_level.max},
{XFS_SYNCD_TIMER, "xfssyncd_centisecs", &xfs_params.syncd_timer.val, {XFS_SYNCD_TIMER, "xfssyncd_centisecs", &xfs_params.syncd_timer.val,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, sizeof(int), 0644, NULL, &proc_dointvec_minmax,
&sysctl_intvec, NULL, &sysctl_intvec, NULL,
&xfs_params.syncd_timer.min, &xfs_params.syncd_timer.max}, &xfs_params.syncd_timer.min, &xfs_params.syncd_timer.max},
{XFS_INHERIT_SYNC, "inherit_sync", &xfs_params.inherit_sync.val, {XFS_INHERIT_SYNC, "inherit_sync", &xfs_params.inherit_sync.val,
...@@ -118,7 +100,7 @@ STATIC ctl_table xfs_table[] = { ...@@ -118,7 +100,7 @@ STATIC ctl_table xfs_table[] = {
sizeof(int), 0644, NULL, &proc_dointvec_minmax, sizeof(int), 0644, NULL, &proc_dointvec_minmax,
&sysctl_intvec, NULL, &sysctl_intvec, NULL,
&xfs_params.inherit_noatim.min, &xfs_params.inherit_noatim.max}, &xfs_params.inherit_noatim.min, &xfs_params.inherit_noatim.max},
{XFS_BUF_TIMER, "xfsbufd_centisecs", &xfs_params.xfs_buf_timer.val, {XFS_BUF_TIMER, "xfsbufd_centisecs", &xfs_params.xfs_buf_timer.val,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, sizeof(int), 0644, NULL, &proc_dointvec_minmax,
&sysctl_intvec, NULL, &sysctl_intvec, NULL,
...@@ -136,14 +118,14 @@ STATIC ctl_table xfs_table[] = { ...@@ -136,14 +118,14 @@ STATIC ctl_table xfs_table[] = {
{XFS_ROTORSTEP, "rotorstep", &xfs_params.rotorstep.val, {XFS_ROTORSTEP, "rotorstep", &xfs_params.rotorstep.val,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, sizeof(int), 0644, NULL, &proc_dointvec_minmax,
&sysctl_intvec, NULL, &sysctl_intvec, NULL,
&xfs_params.rotorstep.min, &xfs_params.rotorstep.max}, &xfs_params.rotorstep.min, &xfs_params.rotorstep.max},
/* please keep this the last entry */ /* please keep this the last entry */
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
{XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear.val, {XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear.val,
sizeof(int), 0644, NULL, &xfs_stats_clear_proc_handler, sizeof(int), 0644, NULL, &xfs_stats_clear_proc_handler,
&sysctl_intvec, NULL, &sysctl_intvec, NULL,
&xfs_params.stats_clear.min, &xfs_params.stats_clear.max}, &xfs_params.stats_clear.min, &xfs_params.stats_clear.max},
#endif /* CONFIG_PROC_FS */ #endif /* CONFIG_PROC_FS */
......
/* /*
* Copyright (c) 2001-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2001-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_SYSCTL_H__ #ifndef __XFS_SYSCTL_H__
#define __XFS_SYSCTL_H__ #define __XFS_SYSCTL_H__
......
/* /*
* Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2001-2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_VERSION_H__
#define __XFS_VERSION_H__
/* /*
* Dummy file that can contain a timestamp to put into the * Dummy file that can contain a timestamp to put into the
...@@ -36,9 +24,6 @@ ...@@ -36,9 +24,6 @@
* running * running
*/ */
#ifndef __XFS_VERSION_H__
#define __XFS_VERSION_H__
#define XFS_VERSION_STRING "SGI XFS" #define XFS_VERSION_STRING "SGI XFS"
#endif /* __XFS_VERSION_H__ */ #endif /* __XFS_VERSION_H__ */
/* /*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_fs.h" #include "xfs_fs.h"
#include "xfs_macros.h"
#include "xfs_inum.h" #include "xfs_inum.h"
#include "xfs_log.h" #include "xfs_log.h"
#include "xfs_clnt.h" #include "xfs_clnt.h"
......
/* /*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_VFS_H__ #ifndef __XFS_VFS_H__
#define __XFS_VFS_H__ #define __XFS_VFS_H__
...@@ -95,6 +81,7 @@ typedef enum { ...@@ -95,6 +81,7 @@ typedef enum {
#define VFS_RDONLY 0x0001 /* read-only vfs */ #define VFS_RDONLY 0x0001 /* read-only vfs */
#define VFS_GRPID 0x0002 /* group-ID assigned from directory */ #define VFS_GRPID 0x0002 /* group-ID assigned from directory */
#define VFS_DMI 0x0004 /* filesystem has the DMI enabled */ #define VFS_DMI 0x0004 /* filesystem has the DMI enabled */
#define VFS_32BITINODES 0x0008 /* do not use inums above 32 bits */
#define VFS_END 0x0008 /* max flag */ #define VFS_END 0x0008 /* max flag */
#define SYNC_ATTR 0x0001 /* sync attributes */ #define SYNC_ATTR 0x0001 /* sync attributes */
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
uint64_t vn_generation; /* vnode generation number */ uint64_t vn_generation; /* vnode generation number */
DEFINE_SPINLOCK(vnumber_lock); DEFINE_SPINLOCK(vnumber_lock);
...@@ -44,7 +28,6 @@ DEFINE_SPINLOCK(vnumber_lock); ...@@ -44,7 +28,6 @@ DEFINE_SPINLOCK(vnumber_lock);
#define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC]) #define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC])
STATIC wait_queue_head_t vsync[NVSYNC]; STATIC wait_queue_head_t vsync[NVSYNC];
void void
vn_init(void) vn_init(void)
{ {
...@@ -124,6 +107,7 @@ vn_revalidate_core( ...@@ -124,6 +107,7 @@ vn_revalidate_core(
inode->i_mtime = vap->va_mtime; inode->i_mtime = vap->va_mtime;
inode->i_ctime = vap->va_ctime; inode->i_ctime = vap->va_ctime;
inode->i_atime = vap->va_atime; inode->i_atime = vap->va_atime;
inode->i_blksize = vap->va_blocksize;
if (vap->va_xflags & XFS_XFLAG_IMMUTABLE) if (vap->va_xflags & XFS_XFLAG_IMMUTABLE)
inode->i_flags |= S_IMMUTABLE; inode->i_flags |= S_IMMUTABLE;
else else
......
/* /*
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
* *
* Portions Copyright (c) 1989, 1993 * Portions Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved. * The Regents of the University of California. All rights reserved.
...@@ -216,11 +202,12 @@ typedef void (*vop_rwunlock_t)(bhv_desc_t *, vrwlock_t); ...@@ -216,11 +202,12 @@ typedef void (*vop_rwunlock_t)(bhv_desc_t *, vrwlock_t);
typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int, typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int,
struct xfs_iomap *, int *); struct xfs_iomap *, int *);
typedef int (*vop_reclaim_t)(bhv_desc_t *); typedef int (*vop_reclaim_t)(bhv_desc_t *);
typedef int (*vop_attr_get_t)(bhv_desc_t *, char *, char *, int *, int, typedef int (*vop_attr_get_t)(bhv_desc_t *, const char *, char *, int *,
struct cred *); int, struct cred *);
typedef int (*vop_attr_set_t)(bhv_desc_t *, char *, char *, int, int, typedef int (*vop_attr_set_t)(bhv_desc_t *, const char *, char *, int,
struct cred *); int, struct cred *);
typedef int (*vop_attr_remove_t)(bhv_desc_t *, char *, int, struct cred *); typedef int (*vop_attr_remove_t)(bhv_desc_t *, const char *,
int, struct cred *);
typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int, typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int,
struct attrlist_cursor_kern *, struct cred *); struct attrlist_cursor_kern *, struct cred *);
typedef void (*vop_link_removed_t)(bhv_desc_t *, vnode_t *, int); typedef void (*vop_link_removed_t)(bhv_desc_t *, vnode_t *, int);
...@@ -565,13 +552,6 @@ static __inline__ void vn_flagclr(struct vnode *vp, uint flag) ...@@ -565,13 +552,6 @@ static __inline__ void vn_flagclr(struct vnode *vp, uint flag)
spin_unlock(&vp->v_lock); spin_unlock(&vp->v_lock);
} }
/*
* Update modify/access/change times on the vnode
*/
#define VN_MTIMESET(vp, tvp) (LINVFS_GET_IP(vp)->i_mtime = *(tvp))
#define VN_ATIMESET(vp, tvp) (LINVFS_GET_IP(vp)->i_atime = *(tvp))
#define VN_CTIMESET(vp, tvp) (LINVFS_GET_IP(vp)->i_ctime = *(tvp))
/* /*
* Dealing with bad inodes * Dealing with bad inodes
*/ */
...@@ -603,6 +583,7 @@ static inline int VN_BAD(struct vnode *vp) ...@@ -603,6 +583,7 @@ static inline int VN_BAD(struct vnode *vp)
#define ATTR_LAZY 0x80 /* set/get attributes lazily */ #define ATTR_LAZY 0x80 /* set/get attributes lazily */
#define ATTR_NONBLOCK 0x100 /* return EAGAIN if operation would block */ #define ATTR_NONBLOCK 0x100 /* return EAGAIN if operation would block */
#define ATTR_NOLOCK 0x200 /* Don't grab any conflicting locks */ #define ATTR_NOLOCK 0x200 /* Don't grab any conflicting locks */
#define ATTR_NOSIZETOK 0x400 /* Don't get the SIZE token */
/* /*
* Flags to VOP_FSYNC and VOP_RECLAIM. * Flags to VOP_FSYNC and VOP_RECLAIM.
......
include $(TOPDIR)/fs/xfs/quota/Makefile-linux-$(VERSION).$(PATCHLEVEL)
#
# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it would be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Further, this software is distributed without any warranty that it is
# free of the rightful claim of any third person regarding infringement
# or the like. Any license provided herein, whether implied or
# otherwise, applies only to this software file. Patent licenses, if
# any, provided herein do not apply to combinations of this program with
# other software, or any other product whatsoever.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write the Free Software Foundation, Inc., 59
# Temple Place - Suite 330, Boston MA 02111-1307, USA.
#
# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
# Mountain View, CA 94043, or:
#
# http://www.sgi.com
#
# For further information regarding this notice, see:
#
# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
#
EXTRA_CFLAGS += -I $(TOPDIR)/fs/xfs -I $(TOPDIR)/fs/xfs/linux-2.6
ifeq ($(CONFIG_XFS_DEBUG),y)
EXTRA_CFLAGS += -g -DDEBUG
#EXTRA_CFLAGS += -DQUOTADEBUG
endif
ifeq ($(CONFIG_XFS_TRACE),y)
EXTRA_CFLAGS += -DXFS_DQUOT_TRACE
EXTRA_CFLAGS += -DXFS_VNODE_TRACE
endif
xfs-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \
xfs_dquot_item.o \
xfs_trans_dquot.o \
xfs_qm_syscalls.o \
xfs_qm_bhv.o \
xfs_qm.o
ifeq ($(CONFIG_XFS_QUOTA),y)
xfs-$(CONFIG_PROC_FS) += xfs_qm_stats.o
endif
This diff is collapsed.
/* /*
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_DQUOT_H__ #ifndef __XFS_DQUOT_H__
#define __XFS_DQUOT_H__ #define __XFS_DQUOT_H__
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_fs.h" #include "xfs_fs.h"
#include "xfs_inum.h" #include "xfs_bit.h"
#include "xfs_log.h" #include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h" #include "xfs_trans.h"
#include "xfs_sb.h" #include "xfs_sb.h"
#include "xfs_ag.h" #include "xfs_ag.h"
...@@ -43,18 +29,17 @@ ...@@ -43,18 +29,17 @@
#include "xfs_dmapi.h" #include "xfs_dmapi.h"
#include "xfs_quota.h" #include "xfs_quota.h"
#include "xfs_mount.h" #include "xfs_mount.h"
#include "xfs_alloc_btree.h"
#include "xfs_bmap_btree.h" #include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h" #include "xfs_ialloc_btree.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_attr_sf.h"
#include "xfs_dir_sf.h" #include "xfs_dir_sf.h"
#include "xfs_dir2_sf.h" #include "xfs_dir2_sf.h"
#include "xfs_attr_sf.h"
#include "xfs_dinode.h" #include "xfs_dinode.h"
#include "xfs_inode.h" #include "xfs_inode.h"
#include "xfs_bmap.h" #include "xfs_bmap.h"
#include "xfs_bit.h" #include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_rtalloc.h" #include "xfs_rtalloc.h"
#include "xfs_error.h" #include "xfs_error.h"
#include "xfs_itable.h" #include "xfs_itable.h"
...@@ -65,10 +50,8 @@ ...@@ -65,10 +50,8 @@
#include "xfs_attr.h" #include "xfs_attr.h"
#include "xfs_buf_item.h" #include "xfs_buf_item.h"
#include "xfs_trans_priv.h" #include "xfs_trans_priv.h"
#include "xfs_qm.h" #include "xfs_qm.h"
/* /*
* returns the number of iovecs needed to log the given dquot item. * returns the number of iovecs needed to log the given dquot item.
*/ */
...@@ -467,7 +450,7 @@ xfs_qm_dquot_logitem_init( ...@@ -467,7 +450,7 @@ xfs_qm_dquot_logitem_init(
lp->qli_item.li_mountp = dqp->q_mount; lp->qli_item.li_mountp = dqp->q_mount;
lp->qli_dquot = dqp; lp->qli_dquot = dqp;
lp->qli_format.qlf_type = XFS_LI_DQUOT; lp->qli_format.qlf_type = XFS_LI_DQUOT;
lp->qli_format.qlf_id = INT_GET(dqp->q_core.d_id, ARCH_CONVERT); lp->qli_format.qlf_id = be32_to_cpu(dqp->q_core.d_id);
lp->qli_format.qlf_blkno = dqp->q_blkno; lp->qli_format.qlf_blkno = dqp->q_blkno;
lp->qli_format.qlf_len = 1; lp->qli_format.qlf_len = 1;
/* /*
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_DQUOT_ITEM_H__ #ifndef __XFS_DQUOT_ITEM_H__
#define __XFS_DQUOT_ITEM_H__ #define __XFS_DQUOT_ITEM_H__
......
This diff is collapsed.
/* /*
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_QM_H__ #ifndef __XFS_QM_H__
#define __XFS_QM_H__ #define __XFS_QM_H__
...@@ -40,6 +26,7 @@ ...@@ -40,6 +26,7 @@
struct xfs_qm; struct xfs_qm;
struct xfs_inode; struct xfs_inode;
extern uint ndquot;
extern mutex_t xfs_Gqm_lock; extern mutex_t xfs_Gqm_lock;
extern struct xfs_qm *xfs_Gqm; extern struct xfs_qm *xfs_Gqm;
extern kmem_zone_t *qm_dqzone; extern kmem_zone_t *qm_dqzone;
...@@ -65,9 +52,8 @@ extern kmem_zone_t *qm_dqtrxzone; ...@@ -65,9 +52,8 @@ extern kmem_zone_t *qm_dqtrxzone;
/* /*
* Dquot hashtable constants/threshold values. * Dquot hashtable constants/threshold values.
*/ */
#define XFS_QM_NCSIZE_THRESHOLD 5000 #define XFS_QM_HASHSIZE_LOW (NBPP / sizeof(xfs_dqhash_t))
#define XFS_QM_HASHSIZE_LOW 32 #define XFS_QM_HASHSIZE_HIGH ((NBPP * 4) / sizeof(xfs_dqhash_t))
#define XFS_QM_HASHSIZE_HIGH 64
/* /*
* We output a cmn_err when quotachecking a quota file with more than * We output a cmn_err when quotachecking a quota file with more than
......
/* /*
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_fs.h" #include "xfs_fs.h"
#include "xfs_inum.h" #include "xfs_bit.h"
#include "xfs_log.h" #include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_clnt.h" #include "xfs_clnt.h"
#include "xfs_trans.h" #include "xfs_trans.h"
#include "xfs_sb.h" #include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_dir.h" #include "xfs_dir.h"
#include "xfs_dir2.h" #include "xfs_dir2.h"
#include "xfs_alloc.h" #include "xfs_alloc.h"
#include "xfs_dmapi.h" #include "xfs_dmapi.h"
#include "xfs_quota.h" #include "xfs_quota.h"
#include "xfs_mount.h" #include "xfs_mount.h"
#include "xfs_alloc_btree.h"
#include "xfs_bmap_btree.h" #include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h" #include "xfs_ialloc_btree.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_attr_sf.h"
#include "xfs_dir_sf.h" #include "xfs_dir_sf.h"
#include "xfs_dir2_sf.h" #include "xfs_dir2_sf.h"
#include "xfs_attr_sf.h"
#include "xfs_dinode.h" #include "xfs_dinode.h"
#include "xfs_inode.h" #include "xfs_inode.h"
#include "xfs_ialloc.h"
#include "xfs_itable.h"
#include "xfs_btree.h"
#include "xfs_bmap.h" #include "xfs_bmap.h"
#include "xfs_bit.h"
#include "xfs_rtalloc.h" #include "xfs_rtalloc.h"
#include "xfs_error.h" #include "xfs_error.h"
#include "xfs_itable.h"
#include "xfs_rw.h" #include "xfs_rw.h"
#include "xfs_acl.h" #include "xfs_acl.h"
#include "xfs_cap.h" #include "xfs_cap.h"
#include "xfs_mac.h" #include "xfs_mac.h"
#include "xfs_attr.h" #include "xfs_attr.h"
#include "xfs_buf_item.h" #include "xfs_buf_item.h"
#include "xfs_qm.h" #include "xfs_qm.h"
#define MNTOPT_QUOTA "quota" /* disk quotas (user) */ #define MNTOPT_QUOTA "quota" /* disk quotas (user) */
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_fs.h" #include "xfs_fs.h"
#include "xfs_inum.h" #include "xfs_bit.h"
#include "xfs_log.h" #include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h" #include "xfs_trans.h"
#include "xfs_sb.h" #include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_dir.h" #include "xfs_dir.h"
#include "xfs_dir2.h" #include "xfs_dir2.h"
#include "xfs_alloc.h" #include "xfs_alloc.h"
#include "xfs_dmapi.h" #include "xfs_dmapi.h"
#include "xfs_quota.h" #include "xfs_quota.h"
#include "xfs_mount.h" #include "xfs_mount.h"
#include "xfs_alloc_btree.h"
#include "xfs_bmap_btree.h" #include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h" #include "xfs_ialloc_btree.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_attr_sf.h"
#include "xfs_dir_sf.h" #include "xfs_dir_sf.h"
#include "xfs_dir2_sf.h" #include "xfs_dir2_sf.h"
#include "xfs_attr_sf.h"
#include "xfs_dinode.h" #include "xfs_dinode.h"
#include "xfs_inode.h" #include "xfs_inode.h"
#include "xfs_ialloc.h"
#include "xfs_itable.h"
#include "xfs_bmap.h" #include "xfs_bmap.h"
#include "xfs_bit.h" #include "xfs_btree.h"
#include "xfs_rtalloc.h" #include "xfs_rtalloc.h"
#include "xfs_error.h" #include "xfs_error.h"
#include "xfs_itable.h"
#include "xfs_rw.h" #include "xfs_rw.h"
#include "xfs_acl.h" #include "xfs_acl.h"
#include "xfs_cap.h" #include "xfs_cap.h"
#include "xfs_mac.h" #include "xfs_mac.h"
#include "xfs_attr.h" #include "xfs_attr.h"
#include "xfs_buf_item.h" #include "xfs_buf_item.h"
#include "xfs_qm.h" #include "xfs_qm.h"
struct xqmstats xqmstats; struct xqmstats xqmstats;
......
/* /*
* Copyright (c) 2002 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2002 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_QM_STATS_H__ #ifndef __XFS_QM_STATS_H__
#define __XFS_QM_STATS_H__ #define __XFS_QM_STATS_H__
#if defined(CONFIG_PROC_FS) && !defined(XFS_STATS_OFF) #if defined(CONFIG_PROC_FS) && !defined(XFS_STATS_OFF)
/* /*
......
This diff is collapsed.
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_QUOTA_PRIV_H__ #ifndef __XFS_QUOTA_PRIV_H__
#define __XFS_QUOTA_PRIV_H__ #define __XFS_QUOTA_PRIV_H__
......
This diff is collapsed.
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include "debug.h" #include "debug.h"
#include "spin.h" #include "spin.h"
#include <asm/page.h> #include <asm/page.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/kernel.h> #include <linux/kernel.h>
......
/* /*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or
* under the terms of version 2 of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* This program is distributed in the hope that it would be useful, but * This program is distributed in the hope that it would be useful,
* WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Further, this software is distributed without any warranty that it is * You should have received a copy of the GNU General Public License
* free of the rightful claim of any third person regarding infringement * along with this program; if not, write the Free Software Foundation,
* or the like. Any license provided herein, whether implied or * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#ifndef __XFS_SUPPORT_DEBUG_H__ #ifndef __XFS_SUPPORT_DEBUG_H__
#define __XFS_SUPPORT_DEBUG_H__ #define __XFS_SUPPORT_DEBUG_H__
...@@ -41,9 +27,10 @@ ...@@ -41,9 +27,10 @@
#define CE_ALERT 1 /* alert */ #define CE_ALERT 1 /* alert */
#define CE_PANIC 0 /* panic */ #define CE_PANIC 0 /* panic */
extern void icmn_err(int, char *, va_list); extern void icmn_err(int, char *, va_list)
/* PRINTFLIKE2 */ __attribute__ ((format (printf, 2, 0)));
extern void cmn_err(int, char *, ...); extern void cmn_err(int, char *, ...)
__attribute__ ((format (printf, 2, 3)));
#ifndef STATIC #ifndef STATIC
# define STATIC static # define STATIC static
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment