projects/linux·commit 253ba4e7

Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6

253ba4e7 · Linus Torvalds <[email protected]> · 2008-04-18 08:39:39 -07:00

* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6: (87 commits)
  [XFS] Fix merge failure
  [XFS] The forward declarations for the xfs_ioctl() helpers and the
  [XFS] Update XFS documentation for noikeep/ikeep.
  [XFS] Update XFS Documentation for ikeep and ihashsize
  [XFS] Remove unused HAVE_SPLICE macro.
  [XFS] Remove CONFIG_XFS_SECURITY.
  [XFS] xfs_bmap_compute_maxlevels should be based on di_forkoff
  [XFS] Always use di_forkoff when checking for attr space.
  [XFS] Ensure the inode is joined in xfs_itruncate_finish
  [XFS] Remove periodic logging of in-core superblock counters.
  [XFS] fix logic error in xfs_alloc_ag_vextent_near()
  [XFS] Don't error out on good I/Os.
  [XFS] Catch log unmount failures.
  [XFS] Sanitise xfs_log_force error checking.
  [XFS] Check for errors when changing buffer pointers.
  [XFS] Don't allow silent errors in xfs_inactive().
  [XFS] Catch errors from xfs_imap().
  [XFS] xfs_bulkstat_one_dinode() never returns an error.
  [XFS] xfs_iflush_fork() never returns an error.
  [XFS] Catch unwritten extent conversion errors.
  ...
Commit
253ba4e79edc695b2925bd2ef34de06ff4d4070c
Parents
188da988 · 65e67f51

Merge commit. Changes below are compared with the first parent: 188da988.

Changes

66 files changed · +1907 −2304

FileStatusAddDelContent
Documentation/filesystems/xfs.txtmodified+7−8View file
fs/xfs/Kconfigmodified+0−12View file
fs/xfs/linux-2.6/kmem.cmodified+3−3View file
fs/xfs/linux-2.6/xfs_aops.cmodified+8−4View file
fs/xfs/linux-2.6/xfs_buf.cmodified+4−4View file
fs/xfs/linux-2.6/xfs_buf.hmodified+6−2View file
fs/xfs/linux-2.6/xfs_cred.hmodified+1−1View file
fs/xfs/linux-2.6/xfs_export.cmodified+6−8View file
fs/xfs/linux-2.6/xfs_file.cmodified+4−9View file
fs/xfs/linux-2.6/xfs_fs_subr.cmodified+11−25View file
fs/xfs/linux-2.6/xfs_ioctl.cmodified+312−364View file
fs/xfs/linux-2.6/xfs_iops.cmodified+125−98View file
fs/xfs/linux-2.6/xfs_linux.hmodified+0−1View file
fs/xfs/linux-2.6/xfs_lrw.cmodified+28−42View file
fs/xfs/linux-2.6/xfs_lrw.hmodified+2−1View file
fs/xfs/linux-2.6/xfs_stats.hmodified+2−2View file
fs/xfs/linux-2.6/xfs_super.cmodified+13−14View file
fs/xfs/linux-2.6/xfs_super.hmodified+1−7View file
fs/xfs/linux-2.6/xfs_vfs.hmodified+0−1View file
fs/xfs/linux-2.6/xfs_vnode.hmodified+3−27View file
fs/xfs/quota/xfs_dquot.cmodified+14−6View file
fs/xfs/quota/xfs_dquot_item.cmodified+12−2View file
fs/xfs/quota/xfs_qm.cmodified+45−31View file
fs/xfs/quota/xfs_qm.hmodified+1−1View file
fs/xfs/quota/xfs_qm_stats.hmodified+2−2View file
fs/xfs/quota/xfs_qm_syscalls.cmodified+26−18View file
fs/xfs/support/ktrace.cmodified+19−18View file
fs/xfs/support/ktrace.hmodified+2−1View file
fs/xfs/xfs.hmodified+1−1View file
fs/xfs/xfs_acl.cmodified+10−6View file
fs/xfs/xfs_alloc.cmodified+29−36View file
fs/xfs/xfs_attr.cmodified+1−9View file
fs/xfs/xfs_attr_leaf.cmodified+1−1View file
fs/xfs/xfs_bmap.cmodified+31−28View file
fs/xfs/xfs_bmap.hmodified+1−1View file
fs/xfs/xfs_bmap_btree.cmodified+44−10View file
fs/xfs/xfs_buf_item.cmodified+6−1View file
fs/xfs/xfs_dir2.cmodified+28−34View file
fs/xfs/xfs_dir2.hmodified+7−5View file
fs/xfs/xfs_filestream.cmodified+1−1View file
fs/xfs/xfs_ialloc.cmodified+29−15View file
fs/xfs/xfs_iget.cmodified+3−46View file
fs/xfs/xfs_inode.cmodified+400−423View file
fs/xfs/xfs_inode.hmodified+2−21View file
fs/xfs/xfs_inode_item.cmodified+7−1View file
fs/xfs/xfs_inode_item.hmodified+8−0View file
fs/xfs/xfs_iomap.cmodified+5−2View file
fs/xfs/xfs_itable.cmodified+3−4View file
fs/xfs/xfs_log.cmodified+84−175View file
fs/xfs/xfs_log.hmodified+3−2View file
fs/xfs/xfs_log_priv.hmodified+57−36View file
fs/xfs/xfs_log_recover.cmodified+85−38View file
fs/xfs/xfs_mount.cmodified+37−29View file
fs/xfs/xfs_mount.hmodified+15−15View file
fs/xfs/xfs_rename.cmodified+40−81View file
fs/xfs/xfs_rtalloc.cmodified+25−16View file
fs/xfs/xfs_rw.cmodified+4−4View file
fs/xfs/xfs_trans.hmodified+1−7View file
fs/xfs/xfs_trans_ail.cmodified+61−90View file
fs/xfs/xfs_trans_buf.cmodified+7−8View file
fs/xfs/xfs_types.hmodified+5−0View file
fs/xfs/xfs_utils.cmodified+2−24View file
fs/xfs/xfs_utils.hmodified+7−8View file
fs/xfs/xfs_vfsops.cmodified+24−52View file
fs/xfs/xfs_vnodeops.cmodified+159−346View file
fs/xfs/xfs_vnodeops.hmodified+17−16View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/filesystems/xfs.txt

View file
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt
index 74aeb14..0a1668b 100644
--- a/Documentation/filesystems/xfs.txt
+++ b/Documentation/filesystems/xfs.txt
@@ -52,16 +52,15 @@ When mounting an XFS filesystem, the following options are accepted.
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.
+ In memory inode hashes have been removed, so this option has
+ no function as of August 2007. Option is deprecated.
ikeep/noikeep
- When inode clusters are emptied of inodes, keep them around
- on the disk (ikeep) - this is the traditional XFS behaviour
- and is still the default for now. Using the noikeep option,
- inode clusters are returned to the free space pool.
+ When ikeep is specified, XFS does not delete empty inode clusters
+ and keeps them around on disk. ikeep is the traditional XFS
+ behaviour. When noikeep is specified, empty inode clusters
+ are returned to the free space pool. The default is noikeep for
+ non-DMAPI mounts, while ikeep is the default when DMAPI is in use.
inode64
Indicates that XFS is allowed to create inodes at any location

fs/xfs/Kconfig

View file
diff --git a/fs/xfs/Kconfig b/fs/xfs/Kconfig
index 35115bc..524021f 100644
--- a/fs/xfs/Kconfig
+++ b/fs/xfs/Kconfig
@@ -35,18 +35,6 @@ config XFS_QUOTA
with or without the generic quota support enabled (CONFIG_QUOTA) -
they are completely independent subsystems.
-config XFS_SECURITY
- bool "XFS Security Label support"
- depends on XFS_FS
- help
- Security labels support alternative access control models
- implemented by security modules like SELinux. This option
- enables an extended attribute namespace for inode security
- labels in the XFS filesystem.
-
- If you are not using a security module that requires using
- extended attributes for inode security labels, say N.
-
config XFS_POSIX_ACL
bool "XFS POSIX ACL support"
depends on XFS_FS

fs/xfs/linux-2.6/kmem.c

View file
diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c
index e040f1c..9b1bb17 100644
--- a/fs/xfs/linux-2.6/kmem.c
+++ b/fs/xfs/linux-2.6/kmem.c
@@ -37,7 +37,7 @@ kmem_alloc(size_t size, unsigned int __nocast flags)
#ifdef DEBUG
if (unlikely(!(flags & KM_LARGE) && (size > PAGE_SIZE))) {
printk(KERN_WARNING "Large %s attempt, size=%ld\n",
- __FUNCTION__, (long)size);
+ __func__, (long)size);
dump_stack();
}
#endif
@@ -52,7 +52,7 @@ kmem_alloc(size_t size, unsigned int __nocast flags)
if (!(++retries % 100))
printk(KERN_ERR "XFS: possible memory allocation "
"deadlock in %s (mode:0x%x)\n",
- __FUNCTION__, lflags);
+ __func__, lflags);
congestion_wait(WRITE, HZ/50);
} while (1);
}
@@ -129,7 +129,7 @@ kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags)
if (!(++retries % 100))
printk(KERN_ERR "XFS: possible memory allocation "
"deadlock in %s (mode:0x%x)\n",
- __FUNCTION__, lflags);
+ __func__, lflags);
congestion_wait(WRITE, HZ/50);
} while (1);
}

fs/xfs/linux-2.6/xfs_aops.c

View file
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index e051952..a55c3b2 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -243,8 +243,12 @@ xfs_end_bio_unwritten(
size_t size = ioend->io_size;
if (likely(!ioend->io_error)) {
- if (!XFS_FORCED_SHUTDOWN(ip->i_mount))
- xfs_iomap_write_unwritten(ip, offset, size);
+ if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) {
+ int error;
+ error = xfs_iomap_write_unwritten(ip, offset, size);
+ if (error)
+ ioend->io_error = error;
+ }
xfs_setfilesize(ioend);
}
xfs_destroy_ioend(ioend);
@@ -1532,9 +1536,9 @@ xfs_vm_bmap(
struct xfs_inode *ip = XFS_I(inode);
xfs_itrace_entry(XFS_I(inode));
- xfs_rwlock(ip, VRWLOCK_READ);
+ xfs_ilock(ip, XFS_IOLOCK_SHARED);
xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF);
- xfs_rwunlock(ip, VRWLOCK_READ);
+ xfs_iunlock(ip, XFS_IOLOCK_SHARED);
return generic_block_bmap(mapping, block, xfs_get_blocks);
}

fs/xfs/linux-2.6/xfs_buf.c

View file
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index e347bfd..52f6846 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -400,7 +400,7 @@ _xfs_buf_lookup_pages(
printk(KERN_ERR
"XFS: possible memory allocation "
"deadlock in %s (mode:0x%x)\n",
- __FUNCTION__, gfp_mask);
+ __func__, gfp_mask);
XFS_STATS_INC(xb_page_retries);
xfsbufd_wakeup(0, gfp_mask);
@@ -598,7 +598,7 @@ xfs_buf_get_flags(
error = _xfs_buf_map_pages(bp, flags);
if (unlikely(error)) {
printk(KERN_WARNING "%s: failed to map pages\n",
- __FUNCTION__);
+ __func__);
goto no_buffer;
}
}
@@ -778,7 +778,7 @@ xfs_buf_get_noaddr(
error = _xfs_buf_map_pages(bp, XBF_MAPPED);
if (unlikely(error)) {
printk(KERN_WARNING "%s: failed to map pages\n",
- __FUNCTION__);
+ __func__);
goto fail_free_mem;
}
@@ -1060,7 +1060,7 @@ xfs_buf_iostart(
bp->b_flags &= ~(XBF_READ | XBF_WRITE | XBF_ASYNC);
bp->b_flags |= flags & (XBF_DELWRI | XBF_ASYNC);
xfs_buf_delwri_queue(bp, 1);
- return status;
+ return 0;
}
bp->b_flags &= ~(XBF_READ | XBF_WRITE | XBF_ASYNC | XBF_DELWRI | \

fs/xfs/linux-2.6/xfs_buf.h

View file
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
index a3d207d..841d788 100644
--- a/fs/xfs/linux-2.6/xfs_buf.h
+++ b/fs/xfs/linux-2.6/xfs_buf.h
@@ -387,11 +387,15 @@ static inline int XFS_bwrite(xfs_buf_t *bp)
return error;
}
-static inline int xfs_bdwrite(void *mp, xfs_buf_t *bp)
+/*
+ * No error can be returned from xfs_buf_iostart for delwri
+ * buffers as they are queued and no I/O is issued.
+ */
+static inline void xfs_bdwrite(void *mp, xfs_buf_t *bp)
{
bp->b_strat = xfs_bdstrat_cb;
bp->b_fspriv3 = mp;
- return xfs_buf_iostart(bp, XBF_DELWRI | XBF_ASYNC);
+ (void)xfs_buf_iostart(bp, XBF_DELWRI | XBF_ASYNC);
}
#define XFS_bdstrat(bp) xfs_buf_iorequest(bp)

fs/xfs/linux-2.6/xfs_cred.h

View file
diff --git a/fs/xfs/linux-2.6/xfs_cred.h b/fs/xfs/linux-2.6/xfs_cred.h
index e7f3da6..652721c 100644
--- a/fs/xfs/linux-2.6/xfs_cred.h
+++ b/fs/xfs/linux-2.6/xfs_cred.h
@@ -30,7 +30,7 @@ typedef struct cred {
extern struct cred *sys_cred;
/* this is a hack.. (assumes sys_cred is the only cred_t in the system) */
-static __inline int capable_cred(cred_t *cr, int cid)
+static inline int capable_cred(cred_t *cr, int cid)
{
return (cr == sys_cred) ? 1 : capable(cid);
}

fs/xfs/linux-2.6/xfs_export.c

View file
diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c
index ca4f66c..265f016 100644
--- a/fs/xfs/linux-2.6/xfs_export.c
+++ b/fs/xfs/linux-2.6/xfs_export.c
@@ -22,6 +22,7 @@
#include "xfs_trans.h"
#include "xfs_sb.h"
#include "xfs_ag.h"
+#include "xfs_dir2.h"
#include "xfs_dmapi.h"
#include "xfs_mount.h"
#include "xfs_export.h"
@@ -30,8 +31,6 @@
#include "xfs_inode.h"
#include "xfs_vfsops.h"
-static struct dentry dotdot = { .d_name.name = "..", .d_name.len = 2, };
-
/*
* Note that we only accept fileids which are long enough rather than allow
* the parent generation number to default to zero. XFS considers zero a
@@ -66,7 +65,7 @@ xfs_fs_encode_fh(
int len;
/* Directories don't need their parent encoded, they have ".." */
- if (S_ISDIR(inode->i_mode))
+ if (S_ISDIR(inode->i_mode) || !connectable)
fileid_type = FILEID_INO32_GEN;
else
fileid_type = FILEID_INO32_GEN_PARENT;
@@ -213,17 +212,16 @@ xfs_fs_get_parent(
struct dentry *child)
{
int error;
- bhv_vnode_t *cvp;
+ struct xfs_inode *cip;
struct dentry *parent;
- cvp = NULL;
- error = xfs_lookup(XFS_I(child->d_inode), &dotdot, &cvp);
+ error = xfs_lookup(XFS_I(child->d_inode), &xfs_name_dotdot, &cip);
if (unlikely(error))
return ERR_PTR(-error);
- parent = d_alloc_anon(vn_to_inode(cvp));
+ parent = d_alloc_anon(cip->i_vnode);
if (unlikely(!parent)) {
- VN_RELE(cvp);
+ iput(cip->i_vnode);
return ERR_PTR(-ENOMEM);
}
return parent;

fs/xfs/linux-2.6/xfs_file.c

View file
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index edab1ff..0590524 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -469,16 +469,11 @@ xfs_file_open_exec(
struct inode *inode)
{
struct xfs_mount *mp = XFS_M(inode->i_sb);
+ struct xfs_inode *ip = XFS_I(inode);
- if (unlikely(mp->m_flags & XFS_MOUNT_DMAPI)) {
- if (DM_EVENT_ENABLED(XFS_I(inode), DM_EVENT_READ)) {
- bhv_vnode_t *vp = vn_from_inode(inode);
-
- return -XFS_SEND_DATA(mp, DM_EVENT_READ,
- vp, 0, 0, 0, NULL);
- }
- }
-
+ if (unlikely(mp->m_flags & XFS_MOUNT_DMAPI) &&
+ DM_EVENT_ENABLED(ip, DM_EVENT_READ))
+ return -XFS_SEND_DATA(mp, DM_EVENT_READ, ip, 0, 0, 0, NULL);
return 0;
}
#endif /* HAVE_FOP_OPEN_EXEC */

fs/xfs/linux-2.6/xfs_fs_subr.c

View file
diff --git a/fs/xfs/linux-2.6/xfs_fs_subr.c b/fs/xfs/linux-2.6/xfs_fs_subr.c
index ac6d34c..1eefe61 100644
--- a/fs/xfs/linux-2.6/xfs_fs_subr.c
+++ b/fs/xfs/linux-2.6/xfs_fs_subr.c
@@ -17,18 +17,7 @@
*/
#include "xfs.h"
#include "xfs_vnodeops.h"
-
-/*
- * The following six includes are needed so that we can include
- * xfs_inode.h. What a mess..
- */
#include "xfs_bmap_btree.h"
-#include "xfs_inum.h"
-#include "xfs_dir2.h"
-#include "xfs_dir2_sf.h"
-#include "xfs_attr_sf.h"
-#include "xfs_dinode.h"
-
#include "xfs_inode.h"
int fs_noerr(void) { return 0; }
@@ -42,11 +31,10 @@ xfs_tosspages(
xfs_off_t last,
int fiopt)
{
- bhv_vnode_t *vp = XFS_ITOV(ip);
- struct inode *inode = vn_to_inode(vp);
+ struct address_space *mapping = ip->i_vnode->i_mapping;
- if (VN_CACHED(vp))
- truncate_inode_pages(inode->i_mapping, first);
+ if (mapping->nrpages)
+ truncate_inode_pages(mapping, first);
}
int
@@ -56,15 +44,14 @@ xfs_flushinval_pages(
xfs_off_t last,
int fiopt)
{
- bhv_vnode_t *vp = XFS_ITOV(ip);
- struct inode *inode = vn_to_inode(vp);
+ struct address_space *mapping = ip->i_vnode->i_mapping;
int ret = 0;
- if (VN_CACHED(vp)) {
+ if (mapping->nrpages) {
xfs_iflags_clear(ip, XFS_ITRUNCATED);
- ret = filemap_write_and_wait(inode->i_mapping);
+ ret = filemap_write_and_wait(mapping);
if (!ret)
- truncate_inode_pages(inode->i_mapping, first);
+ truncate_inode_pages(mapping, first);
}
return ret;
}
@@ -77,17 +64,16 @@ xfs_flush_pages(
uint64_t flags,
int fiopt)
{
- bhv_vnode_t *vp = XFS_ITOV(ip);
- struct inode *inode = vn_to_inode(vp);
+ struct address_space *mapping = ip->i_vnode->i_mapping;
int ret = 0;
int ret2;
- if (VN_DIRTY(vp)) {
+ if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
xfs_iflags_clear(ip, XFS_ITRUNCATED);
- ret = filemap_fdatawrite(inode->i_mapping);
+ ret = filemap_fdatawrite(mapping);
if (flags & XFS_B_ASYNC)
return ret;
- ret2 = filemap_fdatawait(inode->i_mapping);
+ ret2 = filemap_fdatawait(mapping);
if (!ret)
ret = ret2;
}

fs/xfs/linux-2.6/xfs_ioctl.c

View file
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index f34bd01..bf77597 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -651,314 +651,6 @@ xfs_attrmulti_by_handle(
return -error;
}
-/* prototypes for a few of the stack-hungry cases that have
- * their own functions. Functions are defined after their use
- * so gcc doesn't get fancy and inline them with -03 */
-
-STATIC int
-xfs_ioc_space(
- struct xfs_inode *ip,
- struct inode *inode,
- struct file *filp,
- int flags,
- unsigned int cmd,
- void __user *arg);
-
-STATIC int
-xfs_ioc_bulkstat(
- xfs_mount_t *mp,
- unsigned int cmd,
- void __user *arg);
-
-STATIC int
-xfs_ioc_fsgeometry_v1(
- xfs_mount_t *mp,
- void __user *arg);
-
-STATIC int
-xfs_ioc_fsgeometry(
- xfs_mount_t *mp,
- void __user *arg);
-
-STATIC int
-xfs_ioc_xattr(
- xfs_inode_t *ip,
- struct file *filp,
- unsigned int cmd,
- void __user *arg);
-
-STATIC int
-xfs_ioc_fsgetxattr(
- xfs_inode_t *ip,
- int attr,
- void __user *arg);
-
-STATIC int
-xfs_ioc_getbmap(
- struct xfs_inode *ip,
- int flags,
- unsigned int cmd,
- void __user *arg);
-
-STATIC int
-xfs_ioc_getbmapx(
- struct xfs_inode *ip,
- void __user *arg);
-
-int
-xfs_ioctl(
- xfs_inode_t *ip,
- struct file *filp,
- int ioflags,
- unsigned int cmd,
- void __user *arg)
-{
- struct inode *inode = filp->f_path.dentry->d_inode;
- xfs_mount_t *mp = ip->i_mount;
- int error;
-
- xfs_itrace_entry(XFS_I(inode));
- switch (cmd) {
-
- case XFS_IOC_ALLOCSP:
- case XFS_IOC_FREESP:
- case XFS_IOC_RESVSP:
- case XFS_IOC_UNRESVSP:
- case XFS_IOC_ALLOCSP64:
- case XFS_IOC_FREESP64:
- case XFS_IOC_RESVSP64:
- case XFS_IOC_UNRESVSP64:
- /*
- * Only allow the sys admin to reserve space unless
- * unwritten extents are enabled.
- */
- if (!xfs_sb_version_hasextflgbit(&mp->m_sb) &&
- !capable(CAP_SYS_ADMIN))
- return -EPERM;
-
- return xfs_ioc_space(ip, inode, filp, ioflags, cmd, arg);
-
- case XFS_IOC_DIOINFO: {
- struct dioattr da;
- xfs_buftarg_t *target =
- XFS_IS_REALTIME_INODE(ip) ?
- mp->m_rtdev_targp : mp->m_ddev_targp;
-
- da.d_mem = da.d_miniosz = 1 << target->bt_sshift;
- da.d_maxiosz = INT_MAX & ~(da.d_miniosz - 1);
-
- if (copy_to_user(arg, &da, sizeof(da)))
- return -XFS_ERROR(EFAULT);
- return 0;
- }
-
- case XFS_IOC_FSBULKSTAT_SINGLE:
- case XFS_IOC_FSBULKSTAT:
- case XFS_IOC_FSINUMBERS:
- return xfs_ioc_bulkstat(mp, cmd, arg);
-
- case XFS_IOC_FSGEOMETRY_V1:
- return xfs_ioc_fsgeometry_v1(mp, arg);
-
- case XFS_IOC_FSGEOMETRY:
- return xfs_ioc_fsgeometry(mp, arg);
-
- case XFS_IOC_GETVERSION:
- return put_user(inode->i_generation, (int __user *)arg);
-
- case XFS_IOC_FSGETXATTR:
- return xfs_ioc_fsgetxattr(ip, 0, arg);
- case XFS_IOC_FSGETXATTRA:
- return xfs_ioc_fsgetxattr(ip, 1, arg);
- case XFS_IOC_GETXFLAGS:
- case XFS_IOC_SETXFLAGS:
- case XFS_IOC_FSSETXATTR:
- return xfs_ioc_xattr(ip, filp, cmd, arg);
-
- case XFS_IOC_FSSETDM: {
- struct fsdmidata dmi;
-
- if (copy_from_user(&dmi, arg, sizeof(dmi)))
- return -XFS_ERROR(EFAULT);
-
- error = xfs_set_dmattrs(ip, dmi.fsd_dmevmask,
- dmi.fsd_dmstate);
- return -error;
- }
-
- case XFS_IOC_GETBMAP:
- case XFS_IOC_GETBMAPA:
- return xfs_ioc_getbmap(ip, ioflags, cmd, arg);
-
- case XFS_IOC_GETBMAPX:
- return xfs_ioc_getbmapx(ip, arg);
-
- case XFS_IOC_FD_TO_HANDLE:
- case XFS_IOC_PATH_TO_HANDLE:
- case XFS_IOC_PATH_TO_FSHANDLE:
- return xfs_find_handle(cmd, arg);
-
- case XFS_IOC_OPEN_BY_HANDLE:
- return xfs_open_by_handle(mp, arg, filp, inode);
-
- case XFS_IOC_FSSETDM_BY_HANDLE:
- return xfs_fssetdm_by_handle(mp, arg, inode);
-
- case XFS_IOC_READLINK_BY_HANDLE:
- return xfs_readlink_by_handle(mp, arg, inode);
-
- case XFS_IOC_ATTRLIST_BY_HANDLE:
- return xfs_attrlist_by_handle(mp, arg, inode);
-
- case XFS_IOC_ATTRMULTI_BY_HANDLE:
- return xfs_attrmulti_by_handle(mp, arg, inode);
-
- case XFS_IOC_SWAPEXT: {
- error = xfs_swapext((struct xfs_swapext __user *)arg);
- return -error;
- }
-
- case XFS_IOC_FSCOUNTS: {
- xfs_fsop_counts_t out;
-
- error = xfs_fs_counts(mp, &out);
- if (error)
- return -error;
-
- if (copy_to_user(arg, &out, sizeof(out)))
- return -XFS_ERROR(EFAULT);
- return 0;
- }
-
- case XFS_IOC_SET_RESBLKS: {
- xfs_fsop_resblks_t inout;
- __uint64_t in;
-
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
- if (copy_from_user(&inout, arg, sizeof(inout)))
- return -XFS_ERROR(EFAULT);
-
- /* input parameter is passed in resblks field of structure */
- in = inout.resblks;
- error = xfs_reserve_blocks(mp, &in, &inout);
- if (error)
- return -error;
-
- if (copy_to_user(arg, &inout, sizeof(inout)))
- return -XFS_ERROR(EFAULT);
- return 0;
- }
-
- case XFS_IOC_GET_RESBLKS: {
- xfs_fsop_resblks_t out;
-
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
- error = xfs_reserve_blocks(mp, NULL, &out);
- if (error)
- return -error;
-
- if (copy_to_user(arg, &out, sizeof(out)))
- return -XFS_ERROR(EFAULT);
-
- return 0;
- }
-
- case XFS_IOC_FSGROWFSDATA: {
- xfs_growfs_data_t in;
-
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
- if (copy_from_user(&in, arg, sizeof(in)))
- return -XFS_ERROR(EFAULT);
-
- error = xfs_growfs_data(mp, &in);
- return -error;
- }
-
- case XFS_IOC_FSGROWFSLOG: {
- xfs_growfs_log_t in;
-
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
- if (copy_from_user(&in, arg, sizeof(in)))
- return -XFS_ERROR(EFAULT);
-
- error = xfs_growfs_log(mp, &in);
- return -error;
- }
-
- case XFS_IOC_FSGROWFSRT: {
- xfs_growfs_rt_t in;
-
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;

This diff is incomplete. Download the complete patch.

fs/xfs/linux-2.6/xfs_iops.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/linux-2.6/xfs_linux.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/linux-2.6/xfs_lrw.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/linux-2.6/xfs_lrw.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/linux-2.6/xfs_stats.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/linux-2.6/xfs_super.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/linux-2.6/xfs_super.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/linux-2.6/xfs_vfs.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/linux-2.6/xfs_vnode.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/quota/xfs_dquot.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/quota/xfs_dquot_item.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/quota/xfs_qm.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/quota/xfs_qm.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/quota/xfs_qm_stats.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/quota/xfs_qm_syscalls.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/support/ktrace.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/support/ktrace.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_acl.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_alloc.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_attr.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_attr_leaf.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_bmap.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_bmap.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_bmap_btree.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_buf_item.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_dir2.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_dir2.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_filestream.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_ialloc.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_iget.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_inode.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_inode.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_inode_item.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_inode_item.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_iomap.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_itable.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_log.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_log.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_log_priv.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_log_recover.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_mount.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_mount.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_rename.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_rtalloc.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_rw.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_trans.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_trans_ail.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_trans_buf.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_types.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_utils.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_utils.h

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_vfsops.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_vnodeops.c

View file

This diff is incomplete. Download the complete patch.

fs/xfs/xfs_vnodeops.h

View file

This diff is incomplete. Download the complete patch.