* [patch 00/22] 2.6.29 queue
@ 2008-12-02 16:04 Christoph Hellwig
2008-12-02 16:04 ` [patch 01/22] fix compile on 32 bit systems Christoph Hellwig
` (22 more replies)
0 siblings, 23 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
This is my current 2.6.29 queue. All but a few trivial patches have already
been posted to the list. I have another two patches for 2.6.29 in progress
that aren't included but should go to the list in a few days.
Note that this is a series against the master tree, patches against dmapi or
xfsidbg aren't included (and not relevant for 2.6.29).
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 01/22] fix compile on 32 bit systems
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-02 16:43 ` Eric Sandeen
` (2 more replies)
2008-12-02 16:04 ` [patch 02/22] remove useless mnt_want_write call in xfs_write Christoph Hellwig
` (21 subsequent siblings)
22 siblings, 3 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-fix-32bit-compile --]
[-- Type: text/plain, Size: 2253 bytes --]
The recent compat patches make xfs_file.c include xfs_ioctl32.h unconditional,
which breaks the build on 32 bit systems which don't have the various compat
defintions.
Remove the include and move the defintion of xfs_file_compat_ioctl to xfs_ioctl.h
so that we can avoid including all the compat defintions in xfs_file.c
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/linux-2.6/xfs_file.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_file.c 2008-12-02 11:43:38.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_file.c 2008-12-02 11:44:06.000000000 +0100
@@ -36,9 +36,9 @@
#include "xfs_inode.h"
#include "xfs_error.h"
#include "xfs_rw.h"
-#include "xfs_ioctl32.h"
#include "xfs_vnodeops.h"
#include "xfs_da_btree.h"
+#include "xfs_ioctl.h"
#include <linux/dcache.h>
#include <linux/smp_lock.h>
Index: xfs-master/fs/xfs/linux-2.6/xfs_ioctl.h
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_ioctl.h 2008-12-02 11:44:10.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_ioctl.h 2008-12-02 11:44:52.000000000 +0100
@@ -67,4 +67,16 @@ xfs_attrmulti_attr_remove(
char *name,
__uint32_t flags);
+extern long
+xfs_file_compat_ioctl(
+ struct file *file,
+ unsigned int cmd,
+ unsigned long arg);
+
+extern long
+xfs_file_compat_ioctl_invis(
+ struct file *file,
+ unsigned int cmd,
+ unsigned long arg);
+
#endif
Index: xfs-master/fs/xfs/linux-2.6/xfs_ioctl32.h
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_ioctl32.h 2008-12-02 11:44:10.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_ioctl32.h 2008-12-02 11:44:18.000000000 +0100
@@ -20,9 +20,6 @@
#include <linux/compat.h>
-extern long xfs_file_compat_ioctl(struct file *, unsigned, unsigned long);
-extern long xfs_file_compat_invis_ioctl(struct file *, unsigned, unsigned long);
-
/*
* on 32-bit arches, ioctl argument structures may have different sizes
* and/or alignment. We define compat structures which match the
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 02/22] remove useless mnt_want_write call in xfs_write
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
2008-12-02 16:04 ` [patch 01/22] fix compile on 32 bit systems Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 2:11 ` Dave Chinner
2008-12-02 16:04 ` [patch 03/22] remove unused behvavior cruft in xfs_super.h Christoph Hellwig
` (20 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-remove-mnt_want_write --]
[-- Type: text/plain, Size: 1325 bytes --]
When mnt_want_write was introduced a call to it was added around
xfs_ichgtime, but there is no need for this because a file can't be open
read/write on a r/o mount, and a mount can't degrade r/o while we still
have files open for writing. As the mnt_want_write changes were never
merged into the CVS tree this patch is for mainline only.
Signed-off-by: Christoph Hellwig <hch@lst.de>
--- linux-2.6/fs/xfs/linux-2.6/xfs_lrw.c 2008-08-14 14:52:15.000000000 -0300
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2008-08-14 14:54:53.000000000 -0300
@@ -51,7 +51,6 @@
#include "xfs_vnodeops.h"
#include <linux/capability.h>
-#include <linux/mount.h>
#include <linux/writeback.h>
@@ -668,15 +667,8 @@ start:
if (new_size > xip->i_size)
xip->i_new_size = new_size;
- /*
- * We're not supposed to change timestamps in readonly-mounted
- * filesystems. Throw it away if anyone asks us.
- */
- if (likely(!(ioflags & IO_INVIS) &&
- !mnt_want_write(file->f_path.mnt))) {
+ if (likely(!(ioflags & IO_INVIS)))
xfs_ichgtime(xip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
- mnt_drop_write(file->f_path.mnt);
- }
/*
* If the offset is beyond the size of the file, we have a couple
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 03/22] remove unused behvavior cruft in xfs_super.h
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
2008-12-02 16:04 ` [patch 01/22] fix compile on 32 bit systems Christoph Hellwig
2008-12-02 16:04 ` [patch 02/22] remove useless mnt_want_write call in xfs_write Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 2:12 ` Dave Chinner
2008-12-02 16:04 ` [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free Christoph Hellwig
` (19 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-remove-dmapi-cruft --]
[-- Type: text/plain, Size: 1208 bytes --]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/linux-2.6/xfs_super.h
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_super.h 2008-12-02 11:21:33.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_super.h 2008-12-02 11:21:49.000000000 +0100
@@ -20,24 +20,12 @@
#include <linux/exportfs.h>
-#ifdef CONFIG_XFS_DMAPI
-# define vfs_insertdmapi(vfs) vfs_insertops(vfsp, &xfs_dmops)
-# define vfs_initdmapi() dmapi_init()
-# define vfs_exitdmapi() dmapi_uninit()
-#else
-# define vfs_insertdmapi(vfs) do { } while (0)
-# define vfs_initdmapi() do { } while (0)
-# define vfs_exitdmapi() do { } while (0)
-#endif
-
#ifdef CONFIG_XFS_QUOTA
-# define vfs_insertquota(vfs) vfs_insertops(vfsp, &xfs_qmops)
extern void xfs_qm_init(void);
extern void xfs_qm_exit(void);
# define vfs_initquota() xfs_qm_init()
# define vfs_exitquota() xfs_qm_exit()
#else
-# define vfs_insertquota(vfs) do { } while (0)
# define vfs_initquota() do { } while (0)
# define vfs_exitquota() do { } while (0)
#endif
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (2 preceding siblings ...)
2008-12-02 16:04 ` [patch 03/22] remove unused behvavior cruft in xfs_super.h Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 2:13 ` Dave Chinner
2008-12-03 2:22 ` Eric Sandeen
2008-12-02 16:04 ` [patch 05/22] cleanup the inode reclaim path Christoph Hellwig
` (18 subsequent siblings)
22 siblings, 2 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-kill-xfs_ihash_init-exit --]
[-- Type: text/plain, Size: 773 bytes --]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6-xfs/fs/xfs/xfs_inode.h
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_inode.h 2008-11-19 20:07:01.000000000 +0100
+++ linux-2.6-xfs/fs/xfs/xfs_inode.h 2008-11-19 20:07:05.000000000 +0100
@@ -493,8 +493,6 @@ static inline void xfs_ifunlock(xfs_inod
/*
* xfs_iget.c prototypes.
*/
-void xfs_ihash_init(struct xfs_mount *);
-void xfs_ihash_free(struct xfs_mount *);
xfs_inode_t *xfs_inode_incore(struct xfs_mount *, xfs_ino_t,
struct xfs_trans *);
int xfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t,
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 05/22] cleanup the inode reclaim path
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (3 preceding siblings ...)
2008-12-02 16:04 ` [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 2:29 ` Dave Chinner
2008-12-02 16:04 ` [patch 06/22] kill xfs_buf_iostart Christoph Hellwig
` (17 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-cleanup-xfs_ireclaim --]
[-- Type: text/plain, Size: 9008 bytes --]
Merge xfs_iextract and xfs_idestory into xfs_ireclaim as they are never
called individually. Also rewrite most comments in this area as they
were serverly out of date.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/xfs_iget.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_iget.c 2008-12-01 19:26:04.000000000 +0100
+++ xfs-master/fs/xfs/xfs_iget.c 2008-12-01 19:27:15.000000000 +0100
@@ -450,65 +450,109 @@ xfs_iput_new(
IRELE(ip);
}
-
/*
- * This routine embodies the part of the reclaim code that pulls
- * the inode from the inode hash table and the mount structure's
- * inode list.
- * This should only be called from xfs_reclaim().
+ * This is called free all the memory associated with an inode.
+ * It must free the inode itself and any buffers allocated for
+ * if_extents/if_data and if_broot. It must also free the lock
+ * associated with the inode.
+ *
+ * Note: because we don't initialise everything on reallocation out
+ * of the zone, we must ensure we nullify everything correctly before
+ * freeing the structure.
*/
void
-xfs_ireclaim(xfs_inode_t *ip)
+xfs_ireclaim(
+ struct xfs_inode *ip)
{
- /*
- * Remove from old hash list and mount list.
- */
- XFS_STATS_INC(xs_ig_reclaims);
+ struct xfs_mount *mp = ip->i_mount;
+ struct xfs_perag *pag;
- xfs_iextract(ip);
+ XFS_STATS_INC(xs_ig_reclaims);
/*
- * Here we do a spurious inode lock in order to coordinate with inode
- * cache radix tree lookups. This is because the lookup can reference
- * the inodes in the cache without taking references. We make that OK
- * here by ensuring that we wait until the inode is unlocked after the
- * lookup before we go ahead and free it. We get both the ilock and
- * the iolock because the code may need to drop the ilock one but will
- * still hold the iolock.
+ * Remove the inode from the per-AG radix tree. It doesn't matter
+ * if it was never added to it because radix_tree_delete can deal
+ * with that case just fine.
*/
- xfs_ilock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+ pag = xfs_get_perag(mp, ip->i_ino);
+ write_lock(&pag->pag_ici_lock);
+ radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino));
+ write_unlock(&pag->pag_ici_lock);
+ xfs_put_perag(mp, pag);
/*
- * Release dquots (and their references) if any. An inode may escape
- * xfs_inactive and get here via vn_alloc->vn_reclaim path.
+ * Here we do an (almost) spurious inode lock in order to coordinate
+ * with inode cache radix tree lookups. This is because the lookup
+ * can reference the inodes in the cache without taking references.
+ *
+ * We make that OK here by ensuring that we wait until the inode is
+ * unlocked after the lookup before we go ahead and free it. We get
+ * both the ilock and the iolock because the code may need to drop the
+ * ilock one but will still hold the iolock.
*/
- XFS_QM_DQDETACH(ip->i_mount, ip);
-
+ xfs_ilock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
/*
- * Free all memory associated with the inode.
+ * Release dquots (and their references) if any.
*/
+ XFS_QM_DQDETACH(ip->i_mount, ip);
xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
- xfs_idestroy(ip);
-}
-/*
- * This routine removes an about-to-be-destroyed inode from
- * all of the lists in which it is located with the exception
- * of the behavior chain.
- */
-void
-xfs_iextract(
- xfs_inode_t *ip)
-{
- xfs_mount_t *mp = ip->i_mount;
- xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino);
+ switch (ip->i_d.di_mode & S_IFMT) {
+ case S_IFREG:
+ case S_IFDIR:
+ case S_IFLNK:
+ xfs_idestroy_fork(ip, XFS_DATA_FORK);
+ break;
+ }
- write_lock(&pag->pag_ici_lock);
- radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino));
- write_unlock(&pag->pag_ici_lock);
- xfs_put_perag(mp, pag);
+ if (ip->i_afp)
+ xfs_idestroy_fork(ip, XFS_ATTR_FORK);
+
+#ifdef XFS_INODE_TRACE
+ ktrace_free(ip->i_trace);
+#endif
+#ifdef XFS_BMAP_TRACE
+ ktrace_free(ip->i_xtrace);
+#endif
+#ifdef XFS_BTREE_TRACE
+ ktrace_free(ip->i_btrace);
+#endif
+#ifdef XFS_RW_TRACE
+ ktrace_free(ip->i_rwtrace);
+#endif
+#ifdef XFS_ILOCK_TRACE
+ ktrace_free(ip->i_lock_trace);
+#endif
+#ifdef XFS_DIR2_TRACE
+ ktrace_free(ip->i_dir_trace);
+#endif
+ if (ip->i_itemp) {
+ /*
+ * Only if we are shutting down the fs will we see an
+ * inode still in the AIL. If it is there, we should remove
+ * it to prevent a use-after-free from occurring.
+ */
+ xfs_log_item_t *lip = &ip->i_itemp->ili_item;
+ struct xfs_ail *ailp = lip->li_ailp;
- mp->m_ireclaims++;
+ ASSERT(((lip->li_flags & XFS_LI_IN_AIL) == 0) ||
+ XFS_FORCED_SHUTDOWN(ip->i_mount));
+ if (lip->li_flags & XFS_LI_IN_AIL) {
+ spin_lock(&ailp->xa_lock);
+ if (lip->li_flags & XFS_LI_IN_AIL)
+ xfs_trans_ail_delete(ailp, lip);
+ else
+ spin_unlock(&ailp->xa_lock);
+ }
+ xfs_inode_item_destroy(ip);
+ ip->i_itemp = NULL;
+ }
+ /* asserts to verify all state is correct here */
+ ASSERT(atomic_read(&ip->i_iocount) == 0);
+ ASSERT(atomic_read(&ip->i_pincount) == 0);
+ ASSERT(!spin_is_locked(&ip->i_flags_lock));
+ ASSERT(completion_done(&ip->i_flush));
+ kmem_zone_free(xfs_inode_zone, ip);
}
/*
Index: xfs-master/fs/xfs/xfs_inode.h
===================================================================
--- xfs-master.orig/fs/xfs/xfs_inode.h 2008-12-01 19:26:04.000000000 +0100
+++ xfs-master/fs/xfs/xfs_inode.h 2008-12-01 19:27:15.000000000 +0100
@@ -531,8 +531,6 @@ int xfs_itruncate_finish(struct xfs_tra
xfs_fsize_t, int, int);
int xfs_iunlink(struct xfs_trans *, xfs_inode_t *);
-void xfs_idestroy(xfs_inode_t *);
-void xfs_iextract(xfs_inode_t *);
void xfs_iext_realloc(xfs_inode_t *, int, int);
void xfs_ipin(xfs_inode_t *);
void xfs_iunpin(xfs_inode_t *);
Index: xfs-master/fs/xfs/xfs_mount.h
===================================================================
--- xfs-master.orig/fs/xfs/xfs_mount.h 2008-12-01 19:26:35.000000000 +0100
+++ xfs-master/fs/xfs/xfs_mount.h 2008-12-01 19:27:15.000000000 +0100
@@ -241,7 +241,6 @@ typedef struct xfs_mount {
xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */
spinlock_t m_agirotor_lock;/* .. and lock protecting it */
xfs_agnumber_t m_maxagi; /* highest inode alloc group */
- uint m_ireclaims; /* count of calls to reclaim*/
uint m_readio_log; /* min read size log bytes */
uint m_readio_blocks; /* min read size blocks */
uint m_writeio_log; /* min write size log bytes */
Index: xfs-master/fs/xfs/xfs_inode.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_inode.c 2008-12-01 19:26:04.000000000 +0100
+++ xfs-master/fs/xfs/xfs_inode.c 2008-12-01 19:27:15.000000000 +0100
@@ -2450,78 +2450,6 @@ xfs_idestroy_fork(
}
/*
- * This is called free all the memory associated with an inode.
- * It must free the inode itself and any buffers allocated for
- * if_extents/if_data and if_broot. It must also free the lock
- * associated with the inode.
- *
- * Note: because we don't initialise everything on reallocation out
- * of the zone, we must ensure we nullify everything correctly before
- * freeing the structure.
- */
-void
-xfs_idestroy(
- xfs_inode_t *ip)
-{
- switch (ip->i_d.di_mode & S_IFMT) {
- case S_IFREG:
- case S_IFDIR:
- case S_IFLNK:
- xfs_idestroy_fork(ip, XFS_DATA_FORK);
- break;
- }
- if (ip->i_afp)
- xfs_idestroy_fork(ip, XFS_ATTR_FORK);
-
-#ifdef XFS_INODE_TRACE
- ktrace_free(ip->i_trace);
-#endif
-#ifdef XFS_BMAP_TRACE
- ktrace_free(ip->i_xtrace);
-#endif
-#ifdef XFS_BTREE_TRACE
- ktrace_free(ip->i_btrace);
-#endif
-#ifdef XFS_RW_TRACE
- ktrace_free(ip->i_rwtrace);
-#endif
-#ifdef XFS_ILOCK_TRACE
- ktrace_free(ip->i_lock_trace);
-#endif
-#ifdef XFS_DIR2_TRACE
- ktrace_free(ip->i_dir_trace);
-#endif
- if (ip->i_itemp) {
- /*
- * Only if we are shutting down the fs will we see an
- * inode still in the AIL. If it is there, we should remove
- * it to prevent a use-after-free from occurring.
- */
- xfs_log_item_t *lip = &ip->i_itemp->ili_item;
- struct xfs_ail *ailp = lip->li_ailp;
-
- ASSERT(((lip->li_flags & XFS_LI_IN_AIL) == 0) ||
- XFS_FORCED_SHUTDOWN(ip->i_mount));
- if (lip->li_flags & XFS_LI_IN_AIL) {
- spin_lock(&ailp->xa_lock);
- if (lip->li_flags & XFS_LI_IN_AIL)
- xfs_trans_ail_delete(ailp, lip);
- else
- spin_unlock(&ailp->xa_lock);
- }
- xfs_inode_item_destroy(ip);
- ip->i_itemp = NULL;
- }
- /* asserts to verify all state is correct here */
- ASSERT(atomic_read(&ip->i_iocount) == 0);
- ASSERT(atomic_read(&ip->i_pincount) == 0);
- ASSERT(!spin_is_locked(&ip->i_flags_lock));
- ASSERT(completion_done(&ip->i_flush));
- kmem_zone_free(xfs_inode_zone, ip);
-}
-
-
-/*
* Increment the pin count of the given buffer.
* This value is protected by ipinlock spinlock in the mount structure.
*/
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 06/22] kill xfs_buf_iostart
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (4 preceding siblings ...)
2008-12-02 16:04 ` [patch 05/22] cleanup the inode reclaim path Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 2:37 ` Dave Chinner
2008-12-02 16:04 ` [patch 07/22] stop using igrab in xfs_vn_link Christoph Hellwig
` (16 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-bdwrite_cleanup --]
[-- Type: text/plain, Size: 5726 bytes --]
xfs_buf_iostart is a "shared" helper for xfs_buf_read_flags,
xfs_bawrite, and xfs_bdwrite - except that there isn't much shared
code but rather special cases for each caller.
So remove this function and move the functionality to the caller.
xfs_bawrite and xfs_bdwrite are now big enough to be moved out of
line and the xfs_buf_read_flags is moved into a new helper called
_xfs_buf_read.
(First sent on August 2nd)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/linux-2.6/xfs_buf.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_buf.c 2008-12-01 19:26:04.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_buf.c 2008-12-01 19:27:31.000000000 +0100
@@ -630,6 +630,29 @@ xfs_buf_get_flags(
return NULL;
}
+STATIC int
+_xfs_buf_read(
+ xfs_buf_t *bp,
+ xfs_buf_flags_t flags)
+{
+ int status;
+
+ XB_TRACE(bp, "_xfs_buf_read", (unsigned long)flags);
+
+ ASSERT(!(flags & (XBF_DELWRI|XBF_WRITE)));
+ ASSERT(bp->b_bn != XFS_BUF_DADDR_NULL);
+
+ bp->b_flags &= ~(XBF_WRITE | XBF_ASYNC | XBF_DELWRI | \
+ XBF_READ_AHEAD | _XBF_RUN_QUEUES);
+ bp->b_flags |= flags & (XBF_READ | XBF_ASYNC | \
+ XBF_READ_AHEAD | _XBF_RUN_QUEUES);
+
+ status = xfs_buf_iorequest(bp);
+ if (!status && !(flags & XBF_ASYNC))
+ status = xfs_buf_iowait(bp);
+ return status;
+}
+
xfs_buf_t *
xfs_buf_read_flags(
xfs_buftarg_t *target,
@@ -646,7 +669,7 @@ xfs_buf_read_flags(
if (!XFS_BUF_ISDONE(bp)) {
XB_TRACE(bp, "read", (unsigned long)flags);
XFS_STATS_INC(xb_get_read);
- xfs_buf_iostart(bp, flags);
+ _xfs_buf_read(bp, flags);
} else if (flags & XBF_ASYNC) {
XB_TRACE(bp, "read_async", (unsigned long)flags);
/*
@@ -1048,50 +1071,39 @@ xfs_buf_ioerror(
XB_TRACE(bp, "ioerror", (unsigned long)error);
}
-/*
- * Initiate I/O on a buffer, based on the flags supplied.
- * The b_iodone routine in the buffer supplied will only be called
- * when all of the subsidiary I/O requests, if any, have been completed.
- */
int
-xfs_buf_iostart(
- xfs_buf_t *bp,
- xfs_buf_flags_t flags)
+xfs_bawrite(
+ void *mp,
+ struct xfs_buf *bp)
{
- int status = 0;
+ XB_TRACE(bp, "bawrite", 0);
- XB_TRACE(bp, "iostart", (unsigned long)flags);
+ ASSERT(bp->b_bn != XFS_BUF_DADDR_NULL);
- if (flags & XBF_DELWRI) {
- bp->b_flags &= ~(XBF_READ | XBF_WRITE | XBF_ASYNC);
- bp->b_flags |= flags & (XBF_DELWRI | XBF_ASYNC);
- xfs_buf_delwri_queue(bp, 1);
- return 0;
- }
+ xfs_buf_delwri_dequeue(bp);
- bp->b_flags &= ~(XBF_READ | XBF_WRITE | XBF_ASYNC | XBF_DELWRI | \
- XBF_READ_AHEAD | _XBF_RUN_QUEUES);
- bp->b_flags |= flags & (XBF_READ | XBF_WRITE | XBF_ASYNC | \
- XBF_READ_AHEAD | _XBF_RUN_QUEUES);
+ bp->b_flags &= ~(XBF_READ | XBF_DELWRI | XBF_READ_AHEAD);
+ bp->b_flags |= (XBF_WRITE | XBF_ASYNC | _XBF_RUN_QUEUES);
+
+ bp->b_fspriv3 = mp;
+ bp->b_strat = xfs_bdstrat_cb;
+ return xfs_bdstrat_cb(bp);
+}
- BUG_ON(bp->b_bn == XFS_BUF_DADDR_NULL);
+void
+xfs_bdwrite(
+ void *mp,
+ struct xfs_buf *bp)
+{
+ XB_TRACE(bp, "bdwrite", 0);
- /* For writes allow an alternate strategy routine to precede
- * the actual I/O request (which may not be issued at all in
- * a shutdown situation, for example).
- */
- status = (flags & XBF_WRITE) ?
- xfs_buf_iostrategy(bp) : xfs_buf_iorequest(bp);
+ bp->b_strat = xfs_bdstrat_cb;
+ bp->b_fspriv3 = mp;
- /* Wait for I/O if we are not an async request.
- * Note: async I/O request completion will release the buffer,
- * and that can already be done by this point. So using the
- * buffer pointer from here on, after async I/O, is invalid.
- */
- if (!status && !(flags & XBF_ASYNC))
- status = xfs_buf_iowait(bp);
+ bp->b_flags &= ~XBF_READ;
+ bp->b_flags |= (XBF_DELWRI | XBF_ASYNC);
- return status;
+ xfs_buf_delwri_queue(bp, 1);
}
STATIC_INLINE void
Index: xfs-master/fs/xfs/linux-2.6/xfs_buf.h
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_buf.h 2008-12-01 19:26:04.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_buf.h 2008-12-01 19:27:31.000000000 +0100
@@ -214,9 +214,10 @@ extern void xfs_buf_lock(xfs_buf_t *);
extern void xfs_buf_unlock(xfs_buf_t *);
/* Buffer Read and Write Routines */
+extern int xfs_bawrite(void *mp, xfs_buf_t *bp);
+extern void xfs_bdwrite(void *mp, xfs_buf_t *bp);
extern void xfs_buf_ioend(xfs_buf_t *, int);
extern void xfs_buf_ioerror(xfs_buf_t *, int);
-extern int xfs_buf_iostart(xfs_buf_t *, xfs_buf_flags_t);
extern int xfs_buf_iorequest(xfs_buf_t *);
extern int xfs_buf_iowait(xfs_buf_t *);
extern void xfs_buf_iomove(xfs_buf_t *, size_t, size_t, xfs_caddr_t,
@@ -366,14 +367,6 @@ extern void xfs_buf_trace(xfs_buf_t *, c
#define XFS_BUF_TARGET(bp) ((bp)->b_target)
#define XFS_BUFTARG_NAME(target) xfs_buf_target_name(target)
-static inline int xfs_bawrite(void *mp, xfs_buf_t *bp)
-{
- bp->b_fspriv3 = mp;
- bp->b_strat = xfs_bdstrat_cb;
- xfs_buf_delwri_dequeue(bp);
- return xfs_buf_iostart(bp, XBF_WRITE | XBF_ASYNC | _XBF_RUN_QUEUES);
-}
-
static inline void xfs_buf_relse(xfs_buf_t *bp)
{
if (!bp->b_relse)
@@ -414,17 +407,6 @@ static inline int XFS_bwrite(xfs_buf_t *
return error;
}
-/*
- * 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;
- (void)xfs_buf_iostart(bp, XBF_DELWRI | XBF_ASYNC);
-}
-
#define XFS_bdstrat(bp) xfs_buf_iorequest(bp)
#define xfs_iowait(bp) xfs_buf_iowait(bp)
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 07/22] stop using igrab in xfs_vn_link
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (5 preceding siblings ...)
2008-12-02 16:04 ` [patch 06/22] kill xfs_buf_iostart Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 2:39 ` Dave Chinner
2008-12-02 16:04 ` [patch 08/22] reduce l_icloglock roundtrips Christoph Hellwig
` (15 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-stop-using-igrab-in-xfs_link --]
[-- Type: text/plain, Size: 1365 bytes --]
->link is guranteed to get an already reference inode passed so we
can do a simple increment of i_count instead of using igrab and thus
avoid banging on the global inode_lock. This is what most filesystems
already do.
Also move the increment after the call to xfs_link to simplify error
handling.
(First sent on July 26th)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_iops.c 2008-10-25 13:00:29.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c 2008-10-25 13:13:24.000000000 +0200
@@ -366,21 +366,18 @@ xfs_vn_link(
struct inode *dir,
struct dentry *dentry)
{
- struct inode *inode; /* inode of guy being linked to */
+ struct inode *inode = old_dentry->d_inode;
struct xfs_name name;
int error;
- inode = old_dentry->d_inode;
xfs_dentry_to_name(&name, dentry);
- igrab(inode);
error = xfs_link(XFS_I(dir), XFS_I(inode), &name);
- if (unlikely(error)) {
- iput(inode);
+ if (unlikely(error))
return -error;
- }
xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED);
+ atomic_inc(&inode->i_count);
d_instantiate(dentry, inode);
return 0;
}
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 08/22] reduce l_icloglock roundtrips
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (6 preceding siblings ...)
2008-12-02 16:04 ` [patch 07/22] stop using igrab in xfs_vn_link Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 2:56 ` Dave Chinner
2008-12-02 16:04 ` [patch 09/22] remove dead code from sv_t implementation Christoph Hellwig
` (14 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-reduce-log-lock-roundtrips --]
[-- Type: text/plain, Size: 2626 bytes --]
All but one caller of xlog_state_want_sync drop and re-acquire
l_icloglock around the call to it, just so that xlog_state_want_sync can
acquire and drop it.
Move all lock operation out of l_icloglock and assert that the lock is
held when it is called.
Note that it would make sense to extende this scheme to
xlog_state_release_iclog, but the locking in there is more complicated
and we'd like to keep the atomic_dec_and_lock optmization for those
callers not having l_icloglock yet.
(First sent on Semptember 29th)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/xfs_log.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_log.c 2008-12-02 11:07:00.000000000 +0100
+++ xfs-master/fs/xfs/xfs_log.c 2008-12-02 11:13:33.000000000 +0100
@@ -729,8 +729,8 @@ xfs_log_unmount_write(xfs_mount_t *mp)
spin_lock(&log->l_icloglock);
iclog = log->l_iclog;
atomic_inc(&iclog->ic_refcnt);
- spin_unlock(&log->l_icloglock);
xlog_state_want_sync(log, iclog);
+ spin_unlock(&log->l_icloglock);
error = xlog_state_release_iclog(log, iclog);
spin_lock(&log->l_icloglock);
@@ -767,9 +767,9 @@ xfs_log_unmount_write(xfs_mount_t *mp)
spin_lock(&log->l_icloglock);
iclog = log->l_iclog;
atomic_inc(&iclog->ic_refcnt);
- spin_unlock(&log->l_icloglock);
xlog_state_want_sync(log, iclog);
+ spin_unlock(&log->l_icloglock);
error = xlog_state_release_iclog(log, iclog);
spin_lock(&log->l_icloglock);
@@ -1984,7 +1984,9 @@ xlog_write(xfs_mount_t * mp,
if (iclog->ic_size - log_offset <= sizeof(xlog_op_header_t)) {
xlog_state_finish_copy(log, iclog, record_cnt, data_cnt);
record_cnt = data_cnt = 0;
+ spin_lock(&log->l_icloglock);
xlog_state_want_sync(log, iclog);
+ spin_unlock(&log->l_icloglock);
if (commit_iclog) {
ASSERT(flags & XLOG_COMMIT_TRANS);
*commit_iclog = iclog;
@@ -3193,7 +3195,7 @@ try_again:
STATIC void
xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog)
{
- spin_lock(&log->l_icloglock);
+ ASSERT(spin_is_locked(&log->l_icloglock));
if (iclog->ic_state == XLOG_STATE_ACTIVE) {
xlog_state_switch_iclogs(log, iclog, 0);
@@ -3201,10 +3203,7 @@ xlog_state_want_sync(xlog_t *log, xlog_i
ASSERT(iclog->ic_state &
(XLOG_STATE_WANT_SYNC|XLOG_STATE_IOERROR));
}
-
- spin_unlock(&log->l_icloglock);
-} /* xlog_state_want_sync */
-
+}
/*****************************************************************************
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 09/22] remove dead code from sv_t implementation
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (7 preceding siblings ...)
2008-12-02 16:04 ` [patch 08/22] reduce l_icloglock roundtrips Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 2:56 ` Dave Chinner
2008-12-02 16:04 ` [patch 10/22] kill dead quota flags Christoph Hellwig
` (13 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-simplify-sv --]
[-- Type: text/plain, Size: 1844 bytes --]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6-xfs/fs/xfs/linux-2.6/sv.h
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/sv.h 2008-09-29 10:45:36.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/linux-2.6/sv.h 2008-09-29 10:49:16.000000000 +0200
@@ -32,23 +32,15 @@ typedef struct sv_s {
wait_queue_head_t waiters;
} sv_t;
-#define SV_FIFO 0x0 /* sv_t is FIFO type */
-#define SV_LIFO 0x2 /* sv_t is LIFO type */
-#define SV_PRIO 0x4 /* sv_t is PRIO type */
-#define SV_KEYED 0x6 /* sv_t is KEYED type */
-#define SV_DEFAULT SV_FIFO
-
-
-static inline void _sv_wait(sv_t *sv, spinlock_t *lock, int state,
- unsigned long timeout)
+static inline void _sv_wait(sv_t *sv, spinlock_t *lock)
{
DECLARE_WAITQUEUE(wait, current);
add_wait_queue_exclusive(&sv->waiters, &wait);
- __set_current_state(state);
+ __set_current_state(TASK_UNINTERRUPTIBLE);
spin_unlock(lock);
- schedule_timeout(timeout);
+ schedule();
remove_wait_queue(&sv->waiters, &wait);
}
@@ -58,13 +50,7 @@ static inline void _sv_wait(sv_t *sv, sp
#define sv_destroy(sv) \
/*NOTHING*/
#define sv_wait(sv, pri, lock, s) \
- _sv_wait(sv, lock, TASK_UNINTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT)
-#define sv_wait_sig(sv, pri, lock, s) \
- _sv_wait(sv, lock, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT)
-#define sv_timedwait(sv, pri, lock, s, svf, ts, rts) \
- _sv_wait(sv, lock, TASK_UNINTERRUPTIBLE, timespec_to_jiffies(ts))
-#define sv_timedwait_sig(sv, pri, lock, s, svf, ts, rts) \
- _sv_wait(sv, lock, TASK_INTERRUPTIBLE, timespec_to_jiffies(ts))
+ _sv_wait(sv, lock)
#define sv_signal(sv) \
wake_up(&(sv)->waiters)
#define sv_broadcast(sv) \
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 10/22] kill dead quota flags
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (8 preceding siblings ...)
2008-12-02 16:04 ` [patch 09/22] remove dead code from sv_t implementation Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 2:57 ` Dave Chinner
2008-12-02 16:04 ` [patch 11/22] cleanup xfs_sb.h feature flag helpers Christoph Hellwig
` (12 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-kill-dead-quota-flags --]
[-- Type: text/plain, Size: 1147 bytes --]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/xfs_quota.h
===================================================================
--- xfs-master.orig/fs/xfs/xfs_quota.h 2008-12-01 19:26:03.000000000 +0100
+++ xfs-master/fs/xfs/xfs_quota.h 2008-12-01 19:27:41.000000000 +0100
@@ -84,11 +84,9 @@ typedef struct xfs_dqblk {
#define XFS_DQ_USER 0x0001 /* a user quota */
#define XFS_DQ_PROJ 0x0002 /* project quota */
#define XFS_DQ_GROUP 0x0004 /* a group quota */
-#define XFS_DQ_FLOCKED 0x0008 /* flush lock taken */
-#define XFS_DQ_DIRTY 0x0010 /* dquot is dirty */
-#define XFS_DQ_WANT 0x0020 /* for lookup/reclaim race */
-#define XFS_DQ_INACTIVE 0x0040 /* dq off mplist & hashlist */
-#define XFS_DQ_MARKER 0x0080 /* sentinel */
+#define XFS_DQ_DIRTY 0x0008 /* dquot is dirty */
+#define XFS_DQ_WANT 0x0010 /* for lookup/reclaim race */
+#define XFS_DQ_INACTIVE 0x0020 /* dq off mplist & hashlist */
#define XFS_DQ_ALLTYPES (XFS_DQ_USER|XFS_DQ_PROJ|XFS_DQ_GROUP)
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 11/22] cleanup xfs_sb.h feature flag helpers
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (9 preceding siblings ...)
2008-12-02 16:04 ` [patch 10/22] kill dead quota flags Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 6:26 ` Donald Douwsma
2008-12-02 16:04 ` [patch 12/22] kill dead inode flags Christoph Hellwig
` (11 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-cleanup-sb.h-helpers --]
[-- Type: text/plain, Size: 9945 bytes --]
The various inlines in xfs_sb.h that deal with the superblock version
and fature flags were converted from macros a while ago, and this
show by the odd coding style full of useless braces and backslashes
and the avoidance of conditionals.
Clean these up to look like normal C code.
(First sent on August 2nd)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/xfs_sb.h
===================================================================
--- xfs-master.orig/fs/xfs/xfs_sb.h 2008-12-02 11:07:00.000000000 +0100
+++ xfs-master/fs/xfs/xfs_sb.h 2008-12-02 11:15:20.000000000 +0100
@@ -296,30 +296,34 @@ typedef enum {
#define XFS_SB_VERSION_NUM(sbp) ((sbp)->sb_versionnum & XFS_SB_VERSION_NUMBITS)
-#ifdef __KERNEL__
static inline int xfs_sb_good_version(xfs_sb_t *sbp)
{
- return (((sbp->sb_versionnum >= XFS_SB_VERSION_1) && \
- (sbp->sb_versionnum <= XFS_SB_VERSION_3)) || \
- ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- !((sbp->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) || \
- ((sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && \
- (sbp->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS))) && \
- (sbp->sb_shared_vn <= XFS_SB_MAX_SHARED_VN)));
-}
+ /* We always support version 1-3 */
+ if (sbp->sb_versionnum >= XFS_SB_VERSION_1 &&
+ sbp->sb_versionnum <= XFS_SB_VERSION_3)
+ return 1;
+
+ /* We support version 4 if all feature bits are supported */
+ if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) {
+ if ((sbp->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) ||
+ ((sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) &&
+ (sbp->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS)))
+ return 0;
+
+#ifdef __KERNEL__
+ if (sbp->sb_shared_vn > XFS_SB_MAX_SHARED_VN)
+ return 0;
#else
-static inline int xfs_sb_good_version(xfs_sb_t *sbp)
-{
- return (((sbp->sb_versionnum >= XFS_SB_VERSION_1) && \
- (sbp->sb_versionnum <= XFS_SB_VERSION_3)) || \
- ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- !((sbp->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) || \
- ((sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && \
- (sbp->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS))) && \
- (!(sbp->sb_versionnum & XFS_SB_VERSION_SHAREDBIT) || \
- (sbp->sb_shared_vn <= XFS_SB_MAX_SHARED_VN))));
+ if ((sbp->sb_versionnum & XFS_SB_VERSION_SHAREDBIT) &&
+ sbp->sb_shared_vn > XFS_SB_MAX_SHARED_VN)
+ return 0;
+#endif
+
+ return 1;
+ }
+
+ return 0;
}
-#endif /* __KERNEL__ */
/*
* Detect a mismatched features2 field. Older kernels read/wrote
@@ -332,123 +336,127 @@ static inline int xfs_sb_has_mismatched_
static inline unsigned xfs_sb_version_tonew(unsigned v)
{
- return ((((v) == XFS_SB_VERSION_1) ? \
- 0 : \
- (((v) == XFS_SB_VERSION_2) ? \
- XFS_SB_VERSION_ATTRBIT : \
- (XFS_SB_VERSION_ATTRBIT | XFS_SB_VERSION_NLINKBIT))) | \
- XFS_SB_VERSION_4);
+ if (v == XFS_SB_VERSION_1)
+ return XFS_SB_VERSION_4;
+
+ if (v == XFS_SB_VERSION_2)
+ return XFS_SB_VERSION_4 | XFS_SB_VERSION_ATTRBIT;
+
+ return XFS_SB_VERSION_4 | XFS_SB_VERSION_ATTRBIT |
+ XFS_SB_VERSION_NLINKBIT;
}
static inline unsigned xfs_sb_version_toold(unsigned v)
{
- return (((v) & (XFS_SB_VERSION_QUOTABIT | XFS_SB_VERSION_ALIGNBIT)) ? \
- 0 : \
- (((v) & XFS_SB_VERSION_NLINKBIT) ? \
- XFS_SB_VERSION_3 : \
- (((v) & XFS_SB_VERSION_ATTRBIT) ? \
- XFS_SB_VERSION_2 : \
- XFS_SB_VERSION_1)));
+ if (v & (XFS_SB_VERSION_QUOTABIT | XFS_SB_VERSION_ALIGNBIT))
+ return 0;
+ if (v & XFS_SB_VERSION_NLINKBIT)
+ return XFS_SB_VERSION_3;
+ if (v & XFS_SB_VERSION_ATTRBIT)
+ return XFS_SB_VERSION_2;
+ return XFS_SB_VERSION_1;
}
static inline int xfs_sb_version_hasattr(xfs_sb_t *sbp)
{
- return ((sbp)->sb_versionnum == XFS_SB_VERSION_2) || \
- ((sbp)->sb_versionnum == XFS_SB_VERSION_3) || \
- ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- ((sbp)->sb_versionnum & XFS_SB_VERSION_ATTRBIT));
+ return sbp->sb_versionnum == XFS_SB_VERSION_2 ||
+ sbp->sb_versionnum == XFS_SB_VERSION_3 ||
+ (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
+ (sbp->sb_versionnum & XFS_SB_VERSION_ATTRBIT));
}
static inline void xfs_sb_version_addattr(xfs_sb_t *sbp)
{
- (sbp)->sb_versionnum = (((sbp)->sb_versionnum == XFS_SB_VERSION_1) ? \
- XFS_SB_VERSION_2 : \
- ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) ? \
- ((sbp)->sb_versionnum | XFS_SB_VERSION_ATTRBIT) : \
- (XFS_SB_VERSION_4 | XFS_SB_VERSION_ATTRBIT)));
+ if (sbp->sb_versionnum == XFS_SB_VERSION_1)
+ sbp->sb_versionnum = XFS_SB_VERSION_2;
+ else if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4)
+ sbp->sb_versionnum |= XFS_SB_VERSION_ATTRBIT;
+ else
+ sbp->sb_versionnum = XFS_SB_VERSION_4 | XFS_SB_VERSION_ATTRBIT;
}
static inline int xfs_sb_version_hasnlink(xfs_sb_t *sbp)
{
- return ((sbp)->sb_versionnum == XFS_SB_VERSION_3) || \
- ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- ((sbp)->sb_versionnum & XFS_SB_VERSION_NLINKBIT));
+ return sbp->sb_versionnum == XFS_SB_VERSION_3 ||
+ (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
+ (sbp->sb_versionnum & XFS_SB_VERSION_NLINKBIT));
}
static inline void xfs_sb_version_addnlink(xfs_sb_t *sbp)
{
- (sbp)->sb_versionnum = ((sbp)->sb_versionnum <= XFS_SB_VERSION_2 ? \
- XFS_SB_VERSION_3 : \
- ((sbp)->sb_versionnum | XFS_SB_VERSION_NLINKBIT));
+ if (sbp->sb_versionnum <= XFS_SB_VERSION_2)
+ sbp->sb_versionnum = XFS_SB_VERSION_3;
+ else
+ sbp->sb_versionnum |= XFS_SB_VERSION_NLINKBIT;
}
static inline int xfs_sb_version_hasquota(xfs_sb_t *sbp)
{
- return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- ((sbp)->sb_versionnum & XFS_SB_VERSION_QUOTABIT);
+ return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
+ (sbp->sb_versionnum & XFS_SB_VERSION_QUOTABIT);
}
static inline void xfs_sb_version_addquota(xfs_sb_t *sbp)
{
- (sbp)->sb_versionnum = \
- (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 ? \
- ((sbp)->sb_versionnum | XFS_SB_VERSION_QUOTABIT) : \
- (xfs_sb_version_tonew((sbp)->sb_versionnum) | \
- XFS_SB_VERSION_QUOTABIT));
+ if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4)
+ sbp->sb_versionnum |= XFS_SB_VERSION_QUOTABIT;
+ else
+ sbp->sb_versionnum = xfs_sb_version_tonew(sbp->sb_versionnum) |
+ XFS_SB_VERSION_QUOTABIT;
}
static inline int xfs_sb_version_hasalign(xfs_sb_t *sbp)
{
- return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- ((sbp)->sb_versionnum & XFS_SB_VERSION_ALIGNBIT);
+ return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
+ (sbp->sb_versionnum & XFS_SB_VERSION_ALIGNBIT);
}
static inline int xfs_sb_version_hasdalign(xfs_sb_t *sbp)
{
- return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- ((sbp)->sb_versionnum & XFS_SB_VERSION_DALIGNBIT);
+ return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
+ (sbp->sb_versionnum & XFS_SB_VERSION_DALIGNBIT);
}
static inline int xfs_sb_version_hasshared(xfs_sb_t *sbp)
{
- return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- ((sbp)->sb_versionnum & XFS_SB_VERSION_SHAREDBIT);
+ return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
+ (sbp->sb_versionnum & XFS_SB_VERSION_SHAREDBIT);
}
static inline int xfs_sb_version_hasdirv2(xfs_sb_t *sbp)
{
- return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- ((sbp)->sb_versionnum & XFS_SB_VERSION_DIRV2BIT);
+ return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
+ (sbp->sb_versionnum & XFS_SB_VERSION_DIRV2BIT);
}
static inline int xfs_sb_version_haslogv2(xfs_sb_t *sbp)
{
- return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- ((sbp)->sb_versionnum & XFS_SB_VERSION_LOGV2BIT);
+ return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
+ (sbp->sb_versionnum & XFS_SB_VERSION_LOGV2BIT);
}
static inline int xfs_sb_version_hasextflgbit(xfs_sb_t *sbp)
{
- return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- ((sbp)->sb_versionnum & XFS_SB_VERSION_EXTFLGBIT);
+ return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
+ (sbp->sb_versionnum & XFS_SB_VERSION_EXTFLGBIT);
}
static inline int xfs_sb_version_hassector(xfs_sb_t *sbp)
{
- return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- ((sbp)->sb_versionnum & XFS_SB_VERSION_SECTORBIT);
+ return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
+ (sbp->sb_versionnum & XFS_SB_VERSION_SECTORBIT);
}
static inline int xfs_sb_version_hasasciici(xfs_sb_t *sbp)
{
- return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
+ return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
(sbp->sb_versionnum & XFS_SB_VERSION_BORGBIT);
}
static inline int xfs_sb_version_hasmorebits(xfs_sb_t *sbp)
{
- return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
- ((sbp)->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT);
+ return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 &&
+ (sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT);
}
/*
@@ -463,22 +471,20 @@ static inline int xfs_sb_version_hasmore
static inline int xfs_sb_version_haslazysbcount(xfs_sb_t *sbp)
{
- return (xfs_sb_version_hasmorebits(sbp) && \
- ((sbp)->sb_features2 & XFS_SB_VERSION2_LAZYSBCOUNTBIT));
+ return xfs_sb_version_hasmorebits(sbp) &&
+ (sbp->sb_features2 & XFS_SB_VERSION2_LAZYSBCOUNTBIT);
}
static inline int xfs_sb_version_hasattr2(xfs_sb_t *sbp)
{
- return (xfs_sb_version_hasmorebits(sbp)) && \
- ((sbp)->sb_features2 & XFS_SB_VERSION2_ATTR2BIT);
+ return xfs_sb_version_hasmorebits(sbp) &&
+ (sbp->sb_features2 & XFS_SB_VERSION2_ATTR2BIT);
}
static inline void xfs_sb_version_addattr2(xfs_sb_t *sbp)
{
- ((sbp)->sb_versionnum = \
- ((sbp)->sb_versionnum | XFS_SB_VERSION_MOREBITSBIT), \
- ((sbp)->sb_features2 = \
- ((sbp)->sb_features2 | XFS_SB_VERSION2_ATTR2BIT)));
+ sbp->sb_versionnum |= XFS_SB_VERSION_MOREBITSBIT;
+ sbp->sb_features2 |= XFS_SB_VERSION2_ATTR2BIT;
}
static inline void xfs_sb_version_removeattr2(xfs_sb_t *sbp)
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 12/22] kill dead inode flags
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (10 preceding siblings ...)
2008-12-02 16:04 ` [patch 11/22] cleanup xfs_sb.h feature flag helpers Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 2:59 ` Dave Chinner
2008-12-04 2:24 ` Niv Sardi
2008-12-02 16:04 ` [patch 13/22] remove unused m_inode_quiesce member from struct xfs_mount Christoph Hellwig
` (10 subsequent siblings)
22 siblings, 2 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-kill-dead-inode-flags --]
[-- Type: text/plain, Size: 6014 bytes --]
There are a few inode flags around that aren't used anywhere, so remove
them. Also update xfsidbg to display all used inode flags correctly.
(First sent on July 23nd)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:12:44.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:15:28.000000000 +0100
@@ -317,14 +317,9 @@ xfs_map_blocks(
xfs_iomap_t *mapp,
int flags)
{
- xfs_inode_t *ip = XFS_I(inode);
- int error, nmaps = 1;
+ int nmaps = 1;
- error = xfs_iomap(ip, offset, count,
- flags, mapp, &nmaps);
- if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE)))
- xfs_iflags_set(ip, XFS_IMODIFIED);
- return -error;
+ return -xfs_iomap(XFS_I(inode), offset, count, flags, mapp, &nmaps);
}
STATIC_INLINE int
Index: xfs-master/fs/xfs/linux-2.6/xfs_file.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_file.c 2008-12-02 11:07:08.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_file.c 2008-12-02 11:15:28.000000000 +0100
@@ -283,11 +283,8 @@ xfs_file_ioctl(
unsigned int cmd,
unsigned long p)
{
- int error;
struct inode *inode = filp->f_path.dentry->d_inode;
- error = xfs_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p);
- xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED);
/* NOTE: some of the ioctl's return positive #'s as a
* byte count indicating success, such as
@@ -295,7 +292,7 @@ xfs_file_ioctl(
* like most other routines. This means true
* errors need to be returned as a negative value.
*/
- return error;
+ return xfs_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p);
}
STATIC long
@@ -304,11 +301,8 @@ xfs_file_ioctl_invis(
unsigned int cmd,
unsigned long p)
{
- int error;
struct inode *inode = filp->f_path.dentry->d_inode;
- error = xfs_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, (void __user *)p);
- xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED);
/* NOTE: some of the ioctl's return positive #'s as a
* byte count indicating success, such as
@@ -316,7 +310,7 @@ xfs_file_ioctl_invis(
* like most other routines. This means true
* errors need to be returned as a negative value.
*/
- return error;
+ return xfs_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, (void __user *)p);
}
/*
Index: xfs-master/fs/xfs/linux-2.6/xfs_iops.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_iops.c 2008-12-02 11:13:27.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_iops.c 2008-12-02 11:15:28.000000000 +0100
@@ -159,8 +159,6 @@ xfs_init_security(
}
error = xfs_attr_set(ip, name, value, length, ATTR_SECURE);
- if (!error)
- xfs_iflags_set(ip, XFS_IMODIFIED);
kfree(name);
kfree(value);
@@ -261,7 +259,6 @@ xfs_vn_mknod(
error = _ACL_INHERIT(inode, mode, default_acl);
if (unlikely(error))
goto out_cleanup_inode;
- xfs_iflags_set(ip, XFS_IMODIFIED);
_ACL_FREE(default_acl);
}
@@ -377,7 +374,6 @@ xfs_vn_link(
if (unlikely(error))
return -error;
- xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED);
atomic_inc(&inode->i_count);
d_instantiate(dentry, inode);
return 0;
@@ -888,7 +884,6 @@ xfs_setup_inode(
inode->i_ctime.tv_sec = ip->i_d.di_ctime.t_sec;
inode->i_ctime.tv_nsec = ip->i_d.di_ctime.t_nsec;
xfs_diflags_to_iflags(inode, ip);
- xfs_iflags_clear(ip, XFS_IMODIFIED);
switch (inode->i_mode & S_IFMT) {
case S_IFREG:
Index: xfs-master/fs/xfs/linux-2.6/xfs_super.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_super.c 2008-12-02 11:06:57.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_super.c 2008-12-02 11:15:28.000000000 +0100
@@ -1025,7 +1025,6 @@ xfs_fs_clear_inode(
XFS_STATS_DEC(vn_active);
xfs_inactive(ip);
- xfs_iflags_clear(ip, XFS_IMODIFIED);
}
STATIC void
Index: xfs-master/fs/xfs/xfs_iget.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_iget.c 2008-12-02 11:13:13.000000000 +0100
+++ xfs-master/fs/xfs/xfs_iget.c 2008-12-02 11:15:28.000000000 +0100
@@ -362,7 +362,6 @@ again:
}
xfs_put_perag(mp, pag);
- xfs_iflags_set(ip, XFS_IMODIFIED);
*ipp = ip;
ASSERT(ip->i_df.if_ext_max ==
Index: xfs-master/fs/xfs/xfs_inode.h
===================================================================
--- xfs-master.orig/fs/xfs/xfs_inode.h 2008-12-02 11:13:13.000000000 +0100
+++ xfs-master/fs/xfs/xfs_inode.h 2008-12-02 11:15:28.000000000 +0100
@@ -403,17 +403,12 @@ static inline void xfs_ifunlock(xfs_inod
/*
* In-core inode flags.
*/
-#define XFS_IGRIO 0x0001 /* inode used for guaranteed rate i/o */
-#define XFS_IUIOSZ 0x0002 /* inode i/o sizes have been explicitly set */
-#define XFS_IQUIESCE 0x0004 /* we have started quiescing for this inode */
-#define XFS_IRECLAIM 0x0008 /* we have started reclaiming this inode */
-#define XFS_ISTALE 0x0010 /* inode has been staled */
-#define XFS_IRECLAIMABLE 0x0020 /* inode can be reclaimed */
-#define XFS_INEW 0x0040
-#define XFS_IFILESTREAM 0x0080 /* inode is in a filestream directory */
-#define XFS_IMODIFIED 0x0100 /* XFS inode state possibly differs */
- /* to the Linux inode state. */
-#define XFS_ITRUNCATED 0x0200 /* truncated down so flush-on-close */
+#define XFS_IRECLAIM 0x0001 /* we have started reclaiming this inode */
+#define XFS_ISTALE 0x0002 /* inode has been staled */
+#define XFS_IRECLAIMABLE 0x0004 /* inode can be reclaimed */
+#define XFS_INEW 0x0008 /* inode has just been allocated */
+#define XFS_IFILESTREAM 0x0010 /* inode is in a filestream directory */
+#define XFS_ITRUNCATED 0x0020 /* truncated down so flush-on-close */
/*
* Flags for inode locking.
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 13/22] remove unused m_inode_quiesce member from struct xfs_mount
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (11 preceding siblings ...)
2008-12-02 16:04 ` [patch 12/22] kill dead inode flags Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 2:59 ` Dave Chinner
2008-12-02 16:04 ` [patch 14/22] remove leftovers of shared read-only support Christoph Hellwig
` (9 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-kill-m_inode_quiesce --]
[-- Type: text/plain, Size: 904 bytes --]
(First sent on July 23rd)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/xfs_mount.h
===================================================================
--- xfs-master.orig/fs/xfs/xfs_mount.h 2008-12-01 19:27:15.000000000 +0100
+++ xfs-master/fs/xfs/xfs_mount.h 2008-12-01 19:27:59.000000000 +0100
@@ -302,7 +302,6 @@ typedef struct xfs_mount {
int m_attr_magicpct;/* 37% of the blocksize */
int m_dir_magicpct; /* 37% of the dir blocksize */
__uint8_t m_mk_sharedro; /* mark shared ro on unmount */
- __uint8_t m_inode_quiesce;/* call quiesce on new inodes. */
__uint8_t m_sectbb_log; /* sectlog - BBSHIFT */
const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */
int m_dirblksize; /* directory block sz--bytes */
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 14/22] remove leftovers of shared read-only support
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (12 preceding siblings ...)
2008-12-02 16:04 ` [patch 13/22] remove unused m_inode_quiesce member from struct xfs_mount Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 3:01 ` Dave Chinner
2008-12-02 16:04 ` [patch 15/22] replace b_fspriv with b_mount Christoph Hellwig
` (8 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-kill-m_mk_sharedro --]
[-- Type: text/plain, Size: 3577 bytes --]
We never supported shared read-only filesystems, so remove the dead
code left over from IRIX for it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/xfs_mount.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_mount.c 2008-12-01 19:26:02.000000000 +0100
+++ xfs-master/fs/xfs/xfs_mount.c 2008-12-01 19:28:02.000000000 +0100
@@ -1352,24 +1352,6 @@ xfs_log_sbcount(
return error;
}
-STATIC void
-xfs_mark_shared_ro(
- xfs_mount_t *mp,
- xfs_buf_t *bp)
-{
- xfs_dsb_t *sb = XFS_BUF_TO_SBP(bp);
- __uint16_t version;
-
- if (!(sb->sb_flags & XFS_SBF_READONLY))
- sb->sb_flags |= XFS_SBF_READONLY;
-
- version = be16_to_cpu(sb->sb_versionnum);
- if ((version & XFS_SB_VERSION_NUMBITS) != XFS_SB_VERSION_4 ||
- !(version & XFS_SB_VERSION_SHAREDBIT))
- version |= XFS_SB_VERSION_SHAREDBIT;
- sb->sb_versionnum = cpu_to_be16(version);
-}
-
int
xfs_unmountfs_writesb(xfs_mount_t *mp)
{
@@ -1385,12 +1367,6 @@ xfs_unmountfs_writesb(xfs_mount_t *mp)
sbp = xfs_getsb(mp, 0);
- /*
- * mark shared-readonly if desired
- */
- if (mp->m_mk_sharedro)
- xfs_mark_shared_ro(mp, sbp);
-
XFS_BUF_UNDONE(sbp);
XFS_BUF_UNREAD(sbp);
XFS_BUF_UNDELAYWRITE(sbp);
@@ -1402,8 +1378,6 @@ xfs_unmountfs_writesb(xfs_mount_t *mp)
if (error)
xfs_ioerror_alert("xfs_unmountfs_writesb",
mp, sbp, XFS_BUF_ADDR(sbp));
- if (error && mp->m_mk_sharedro)
- xfs_fs_cmn_err(CE_ALERT, mp, "Superblock write error detected while unmounting. Filesystem may not be marked shared readonly");
xfs_buf_relse(sbp);
}
return error;
Index: xfs-master/fs/xfs/xfs_mount.h
===================================================================
--- xfs-master.orig/fs/xfs/xfs_mount.h 2008-12-01 19:27:59.000000000 +0100
+++ xfs-master/fs/xfs/xfs_mount.h 2008-12-01 19:28:02.000000000 +0100
@@ -301,7 +301,6 @@ typedef struct xfs_mount {
int m_sinoalign; /* stripe unit inode alignment */
int m_attr_magicpct;/* 37% of the blocksize */
int m_dir_magicpct; /* 37% of the dir blocksize */
- __uint8_t m_mk_sharedro; /* mark shared ro on unmount */
__uint8_t m_sectbb_log; /* sectlog - BBSHIFT */
const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */
int m_dirblksize; /* directory block sz--bytes */
Index: xfs-master/fs/xfs/linux-2.6/xfs_super.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_super.c 2008-12-01 19:27:52.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_super.c 2008-12-01 19:28:02.000000000 +0100
@@ -1388,35 +1388,6 @@ xfs_finish_flags(
return XFS_ERROR(EROFS);
}
-#if 0 /* shared mounts were never supported on Linux */
- /*
- * check for shared mount.
- */
- if (ap->flags & XFSMNT_SHARED) {
- if (!xfs_sb_version_hasshared(&mp->m_sb))
- return XFS_ERROR(EINVAL);
-
- /*
- * For IRIX 6.5, shared mounts must have the shared
- * version bit set, have the persistent readonly
- * field set, must be version 0 and can only be mounted
- * read-only.
- */
- if (!ronly || !(mp->m_sb.sb_flags & XFS_SBF_READONLY) ||
- (mp->m_sb.sb_shared_vn != 0))
- return XFS_ERROR(EINVAL);
-
- mp->m_flags |= XFS_MOUNT_SHARED;
-
- /*
- * Shared XFS V0 can't deal with DMI. Return EINVAL.
- */
- if (mp->m_sb.sb_shared_vn == 0 &&
- (mp->m_flags & XFS_MOUNT_DMAPI))
- return XFS_ERROR(EINVAL);
- }
-#endif
-
return 0;
}
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 15/22] replace b_fspriv with b_mount
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (13 preceding siblings ...)
2008-12-02 16:04 ` [patch 14/22] remove leftovers of shared read-only support Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 14:03 ` Christoph Hellwig
2008-12-03 21:54 ` Dave Chinner
2008-12-02 16:04 ` [patch 16/22] use xfs_trans_ijoin in xfs_trans_iget Christoph Hellwig
` (7 subsequent siblings)
22 siblings, 2 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-add-bp_mount-field --]
[-- Type: text/plain, Size: 6436 bytes --]
Replace the b_fspriv pointer and it's ugly accessors with a properly types
xfs_mount pointer. Also switch log reocvery over to it instead of using
b_fspriv for the mount pointer.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_buf.c 2008-11-15 15:27:32.000000000 +0100
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.c 2008-11-15 15:28:01.000000000 +0100
@@ -1085,7 +1085,7 @@ xfs_bawrite(
bp->b_flags &= ~(XBF_READ | XBF_DELWRI | XBF_READ_AHEAD);
bp->b_flags |= (XBF_WRITE | XBF_ASYNC | _XBF_RUN_QUEUES);
- bp->b_fspriv3 = mp;
+ bp->b_mount = mp;
bp->b_strat = xfs_bdstrat_cb;
return xfs_bdstrat_cb(bp);
}
@@ -1098,7 +1098,7 @@ xfs_bdwrite(
XB_TRACE(bp, "bdwrite", 0);
bp->b_strat = xfs_bdstrat_cb;
- bp->b_fspriv3 = mp;
+ bp->b_mount = mp;
bp->b_flags &= ~XBF_READ;
bp->b_flags |= (XBF_DELWRI | XBF_ASYNC);
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.h
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_buf.h 2008-11-15 15:28:08.000000000 +0100
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.h 2008-11-15 15:29:12.000000000 +0100
@@ -168,7 +168,7 @@ typedef struct xfs_buf {
struct completion b_iowait; /* queue for I/O waiters */
void *b_fspriv;
void *b_fspriv2;
- void *b_fspriv3;
+ struct xfs_mount *b_mount;
unsigned short b_error; /* error code on I/O */
unsigned int b_page_count; /* size of page array */
unsigned int b_offset; /* page offset in first page */
@@ -335,8 +335,6 @@ extern void xfs_buf_trace(xfs_buf_t *, c
#define XFS_BUF_SET_FSPRIVATE(bp, val) ((bp)->b_fspriv = (void*)(val))
#define XFS_BUF_FSPRIVATE2(bp, type) ((type)(bp)->b_fspriv2)
#define XFS_BUF_SET_FSPRIVATE2(bp, val) ((bp)->b_fspriv2 = (void*)(val))
-#define XFS_BUF_FSPRIVATE3(bp, type) ((type)(bp)->b_fspriv3)
-#define XFS_BUF_SET_FSPRIVATE3(bp, val) ((bp)->b_fspriv3 = (void*)(val))
#define XFS_BUF_SET_START(bp) do { } while (0)
#define XFS_BUF_SET_BRELSE_FUNC(bp, func) ((bp)->b_relse = (func))
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.c 2008-11-15 15:25:29.000000000 +0100
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2008-11-15 15:26:27.000000000 +0100
@@ -847,13 +847,7 @@ retry:
int
xfs_bdstrat_cb(struct xfs_buf *bp)
{
- xfs_mount_t *mp;
-
- mp = XFS_BUF_FSPRIVATE3(bp, xfs_mount_t *);
- if (!XFS_FORCED_SHUTDOWN(mp)) {
- xfs_buf_iorequest(bp);
- return 0;
- } else {
+ if (XFS_FORCED_SHUTDOWN(bp->b_mount)) {
xfs_buftrace("XFS__BDSTRAT IOERROR", bp);
/*
* Metadata write that didn't get logged but
@@ -866,6 +860,9 @@ xfs_bdstrat_cb(struct xfs_buf *bp)
else
return (xfs_bioerror(bp));
}
+
+ xfs_buf_iorequest(bp);
+ return 0;
}
/*
Index: linux-2.6-xfs/fs/xfs/xfs_buf_item.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_buf_item.c 2008-11-15 15:24:38.000000000 +0100
+++ linux-2.6-xfs/fs/xfs/xfs_buf_item.c 2008-11-15 15:25:05.000000000 +0100
@@ -707,8 +707,8 @@ xfs_buf_item_init(
* the first. If we do already have one, there is
* nothing to do here so return.
*/
- if (XFS_BUF_FSPRIVATE3(bp, xfs_mount_t *) != mp)
- XFS_BUF_SET_FSPRIVATE3(bp, mp);
+ if (bp->b_mount != mp)
+ bp->b_mount = mp;
XFS_BUF_SET_BDSTRAT_FUNC(bp, xfs_bdstrat_cb);
if (XFS_BUF_FSPRIVATE(bp, void *) != NULL) {
lip = XFS_BUF_FSPRIVATE(bp, xfs_log_item_t *);
Index: linux-2.6-xfs/fs/xfs/xfs_rw.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_rw.c 2008-11-15 15:26:37.000000000 +0100
+++ linux-2.6-xfs/fs/xfs/xfs_rw.c 2008-11-15 15:27:17.000000000 +0100
@@ -406,7 +406,7 @@ xfs_bwrite(
* XXXsup how does this work for quotas.
*/
XFS_BUF_SET_BDSTRAT_FUNC(bp, xfs_bdstrat_cb);
- XFS_BUF_SET_FSPRIVATE3(bp, mp);
+ bp->b_mount = mp;
XFS_BUF_WRITE(bp);
if ((error = XFS_bwrite(bp))) {
Index: linux-2.6-xfs/fs/xfs/xfs_log_recover.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_log_recover.c 2008-11-15 15:31:41.000000000 +0100
+++ linux-2.6-xfs/fs/xfs/xfs_log_recover.c 2008-11-15 15:35:12.000000000 +0100
@@ -267,21 +267,16 @@ STATIC void
xlog_recover_iodone(
struct xfs_buf *bp)
{
- xfs_mount_t *mp;
-
- ASSERT(XFS_BUF_FSPRIVATE(bp, void *));
-
if (XFS_BUF_GETERROR(bp)) {
/*
* We're not going to bother about retrying
* this during recovery. One strike!
*/
- mp = XFS_BUF_FSPRIVATE(bp, xfs_mount_t *);
xfs_ioerror_alert("xlog_recover_iodone",
- mp, bp, XFS_BUF_ADDR(bp));
- xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR);
+ bp->b_mount, bp, XFS_BUF_ADDR(bp));
+ xfs_force_shutdown(bp->b_mount, SHUTDOWN_META_IO_ERROR);
}
- XFS_BUF_SET_FSPRIVATE(bp, NULL);
+ bp->b_mount = NULL;
XFS_BUF_CLR_IODONE_FUNC(bp);
xfs_biodone(bp);
}
@@ -2225,9 +2220,8 @@ xlog_recover_do_buffer_trans(
XFS_BUF_STALE(bp);
error = xfs_bwrite(mp, bp);
} else {
- ASSERT(XFS_BUF_FSPRIVATE(bp, void *) == NULL ||
- XFS_BUF_FSPRIVATE(bp, xfs_mount_t *) == mp);
- XFS_BUF_SET_FSPRIVATE(bp, mp);
+ ASSERT(bp->b_mount == NULL || bp->b_mount == mp);
+ bp->b_mount = mp;
XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone);
xfs_bdwrite(mp, bp);
}
@@ -2490,9 +2484,8 @@ xlog_recover_do_inode_trans(
write_inode_buffer:
if (ITEM_TYPE(item) == XFS_LI_INODE) {
- ASSERT(XFS_BUF_FSPRIVATE(bp, void *) == NULL ||
- XFS_BUF_FSPRIVATE(bp, xfs_mount_t *) == mp);
- XFS_BUF_SET_FSPRIVATE(bp, mp);
+ ASSERT(bp->b_mount == NULL || bp->b_mount == mp);
+ bp->b_mount = mp;
XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone);
xfs_bdwrite(mp, bp);
} else {
@@ -2623,9 +2616,8 @@ xlog_recover_do_dquot_trans(
memcpy(ddq, recddq, item->ri_buf[1].i_len);
ASSERT(dq_f->qlf_size == 2);
- ASSERT(XFS_BUF_FSPRIVATE(bp, void *) == NULL ||
- XFS_BUF_FSPRIVATE(bp, xfs_mount_t *) == mp);
- XFS_BUF_SET_FSPRIVATE(bp, mp);
+ ASSERT(bp->b_mount == NULL || bp->b_mount == mp);
+ bp->b_mount = mp;
XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone);
xfs_bdwrite(mp, bp);
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 16/22] use xfs_trans_ijoin in xfs_trans_iget
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (14 preceding siblings ...)
2008-12-02 16:04 ` [patch 15/22] replace b_fspriv with b_mount Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 3:03 ` Dave Chinner
2008-12-02 16:04 ` [patch 17/22] no explicit xfs_iflush for special inodes during unmount Christoph Hellwig
` (6 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-cleanup-xfs_trans_iget --]
[-- Type: text/plain, Size: 1652 bytes --]
Use xfs_trans_ijoin in xfs_trans_iget in case we need to join an inode into
a transaction instead of opencoding it. Based on a discussion with and an
incomplete patch from Niv Sardi.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6-xfs/fs/xfs/xfs_trans_inode.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_trans_inode.c 2008-11-19 19:43:42.000000000 +0100
+++ linux-2.6-xfs/fs/xfs/xfs_trans_inode.c 2008-11-19 19:55:45.000000000 +0100
@@ -85,7 +85,6 @@ xfs_trans_iget(
{
int error;
xfs_inode_t *ip;
- xfs_inode_log_item_t *iip;
/*
* If the transaction pointer is NULL, just call the normal
@@ -138,34 +137,7 @@ xfs_trans_iget(
}
ASSERT(ip != NULL);
- /*
- * Get a log_item_desc to point at the new item.
- */
- if (ip->i_itemp == NULL)
- xfs_inode_item_init(ip, mp);
- iip = ip->i_itemp;
- (void) xfs_trans_add_item(tp, (xfs_log_item_t *)(iip));
-
- xfs_trans_inode_broot_debug(ip);
-
- /*
- * If the IO lock has been acquired, mark that in
- * the inode log item so we'll know to unlock it
- * when the transaction commits.
- */
- ASSERT(iip->ili_flags == 0);
- if (lock_flags & XFS_IOLOCK_EXCL) {
- iip->ili_flags |= XFS_ILI_IOLOCKED_EXCL;
- } else if (lock_flags & XFS_IOLOCK_SHARED) {
- iip->ili_flags |= XFS_ILI_IOLOCKED_SHARED;
- }
-
- /*
- * Initialize i_transp so we can find it with xfs_inode_incore()
- * above.
- */
- ip->i_transp = tp;
-
+ xfs_trans_ijoin(tp, ip, lock_flags);
*ipp = ip;
return 0;
}
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 17/22] no explicit xfs_iflush for special inodes during unmount
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (15 preceding siblings ...)
2008-12-02 16:04 ` [patch 16/22] use xfs_trans_ijoin in xfs_trans_iget Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 3:06 ` Dave Chinner
2008-12-02 16:04 ` [patch 18/22] kill xfs_unmount_flush Christoph Hellwig
` (5 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-stop-flushing-special-inodes --]
[-- Type: text/plain, Size: 6390 bytes --]
Currently we explicitly call xfs_iflush on the quota, real-time and root
inodes from xfs_unmount_flush. But we just called xfs_sync_inodes with
SYNC_ATTR and do an XFS_bflush aka xfs_flush_buftarg to make sure all inodes
are on disk already, so there is no need for these special cases.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/quota/xfs_qm.c
===================================================================
--- xfs-master.orig/fs/xfs/quota/xfs_qm.c 2008-12-01 21:33:53.000000000 +0100
+++ xfs-master/fs/xfs/quota/xfs_qm.c 2008-12-02 11:26:22.000000000 +0100
@@ -395,13 +395,10 @@ xfs_qm_mount_quotas(
/*
* Called from the vfsops layer.
*/
-int
+void
xfs_qm_unmount_quotas(
xfs_mount_t *mp)
{
- xfs_inode_t *uqp, *gqp;
- int error = 0;
-
/*
* Release the dquots that root inode, et al might be holding,
* before we flush quotas and blow away the quotainfo structure.
@@ -414,43 +411,18 @@ xfs_qm_unmount_quotas(
xfs_qm_dqdetach(mp->m_rsumip);
/*
- * Flush out the quota inodes.
+ * Release the quota inodes.
*/
- uqp = gqp = NULL;
if (mp->m_quotainfo) {
- if ((uqp = mp->m_quotainfo->qi_uquotaip) != NULL) {
- xfs_ilock(uqp, XFS_ILOCK_EXCL);
- xfs_iflock(uqp);
- error = xfs_iflush(uqp, XFS_IFLUSH_SYNC);
- xfs_iunlock(uqp, XFS_ILOCK_EXCL);
- if (unlikely(error == EFSCORRUPTED)) {
- XFS_ERROR_REPORT("xfs_qm_unmount_quotas(1)",
- XFS_ERRLEVEL_LOW, mp);
- goto out;
- }
- }
- if ((gqp = mp->m_quotainfo->qi_gquotaip) != NULL) {
- xfs_ilock(gqp, XFS_ILOCK_EXCL);
- xfs_iflock(gqp);
- error = xfs_iflush(gqp, XFS_IFLUSH_SYNC);
- xfs_iunlock(gqp, XFS_ILOCK_EXCL);
- if (unlikely(error == EFSCORRUPTED)) {
- XFS_ERROR_REPORT("xfs_qm_unmount_quotas(2)",
- XFS_ERRLEVEL_LOW, mp);
- goto out;
- }
+ if (mp->m_quotainfo->qi_uquotaip) {
+ IRELE(mp->m_quotainfo->qi_uquotaip);
+ mp->m_quotainfo->qi_uquotaip = NULL;
+ }
+ if (mp->m_quotainfo->qi_gquotaip) {
+ IRELE(mp->m_quotainfo->qi_gquotaip);
+ mp->m_quotainfo->qi_gquotaip = NULL;
}
}
- if (uqp) {
- IRELE(uqp);
- mp->m_quotainfo->qi_uquotaip = NULL;
- }
- if (gqp) {
- IRELE(gqp);
- mp->m_quotainfo->qi_gquotaip = NULL;
- }
-out:
- return XFS_ERROR(error);
}
/*
Index: xfs-master/fs/xfs/xfs_vfsops.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_vfsops.c 2008-12-01 21:33:53.000000000 +0100
+++ xfs-master/fs/xfs/xfs_vfsops.c 2008-12-02 11:24:59.000000000 +0100
@@ -68,74 +68,16 @@ xfs_unmount_flush(
rid of. */
int relocation) /* Called from vfs relocation. */
{
- xfs_inode_t *rip = mp->m_rootip;
- xfs_inode_t *rbmip;
- xfs_inode_t *rsumip = NULL;
- int error;
-
- xfs_ilock(rip, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT);
- xfs_iflock(rip);
-
- /*
- * Flush out the real time inodes.
- */
- if ((rbmip = mp->m_rbmip) != NULL) {
- xfs_ilock(rbmip, XFS_ILOCK_EXCL);
- xfs_iflock(rbmip);
- error = xfs_iflush(rbmip, XFS_IFLUSH_SYNC);
- xfs_iunlock(rbmip, XFS_ILOCK_EXCL);
-
- if (error == EFSCORRUPTED)
- goto fscorrupt_out;
-
- ASSERT(vn_count(VFS_I(rbmip)) == 1);
-
- rsumip = mp->m_rsumip;
- xfs_ilock(rsumip, XFS_ILOCK_EXCL);
- xfs_iflock(rsumip);
- error = xfs_iflush(rsumip, XFS_IFLUSH_SYNC);
- xfs_iunlock(rsumip, XFS_ILOCK_EXCL);
-
- if (error == EFSCORRUPTED)
- goto fscorrupt_out;
-
- ASSERT(vn_count(VFS_I(rsumip)) == 1);
- }
-
- /*
- * Synchronously flush root inode to disk
- */
- error = xfs_iflush(rip, XFS_IFLUSH_SYNC);
- if (error == EFSCORRUPTED)
- goto fscorrupt_out2;
-
- if (vn_count(VFS_I(rip)) != 1 && !relocation) {
- xfs_iunlock(rip, XFS_ILOCK_EXCL);
- return XFS_ERROR(EBUSY);
- }
-
/*
* Release dquot that rootinode, rbmino and rsumino might be holding,
* flush and purge the quota inodes.
*/
- error = XFS_QM_UNMOUNT(mp);
- if (error == EFSCORRUPTED)
- goto fscorrupt_out2;
+ XFS_QM_UNMOUNT(mp);
- if (rbmip) {
- IRELE(rbmip);
- IRELE(rsumip);
- }
+ if (mp->m_rbmip)
+ IRELE(mp->m_rbmip);
+ if (mp->m_rsumip)
+ IRELE(mp->m_rsumip);
- xfs_iunlock(rip, XFS_ILOCK_EXCL);
return 0;
-
-fscorrupt_out:
- xfs_ifunlock(rip);
-
-fscorrupt_out2:
- xfs_iunlock(rip, XFS_ILOCK_EXCL);
-
- return XFS_ERROR(EFSCORRUPTED);
}
-
Index: xfs-master/fs/xfs/quota/xfs_qm.h
===================================================================
--- xfs-master.orig/fs/xfs/quota/xfs_qm.h 2008-12-01 21:33:53.000000000 +0100
+++ xfs-master/fs/xfs/quota/xfs_qm.h 2008-12-02 11:24:59.000000000 +0100
@@ -167,7 +167,7 @@ extern void xfs_qm_destroy_quotainfo(xf
extern void xfs_qm_mount_quotas(xfs_mount_t *);
extern int xfs_qm_quotacheck(xfs_mount_t *);
extern void xfs_qm_unmount_quotadestroy(xfs_mount_t *);
-extern int xfs_qm_unmount_quotas(xfs_mount_t *);
+extern void xfs_qm_unmount_quotas(xfs_mount_t *);
extern int xfs_qm_write_sb_changes(xfs_mount_t *, __int64_t);
extern int xfs_qm_sync(xfs_mount_t *, int);
Index: xfs-master/fs/xfs/xfs_mount.h
===================================================================
--- xfs-master.orig/fs/xfs/xfs_mount.h 2008-12-02 11:22:46.000000000 +0100
+++ xfs-master/fs/xfs/xfs_mount.h 2008-12-02 11:24:59.000000000 +0100
@@ -117,7 +117,7 @@ struct xfs_quotainfo;
typedef int (*xfs_qminit_t)(struct xfs_mount *, uint *, uint *);
typedef int (*xfs_qmmount_t)(struct xfs_mount *, uint, uint);
-typedef int (*xfs_qmunmount_t)(struct xfs_mount *);
+typedef void (*xfs_qmunmount_t)(struct xfs_mount *);
typedef void (*xfs_qmdone_t)(struct xfs_mount *);
typedef void (*xfs_dqrele_t)(struct xfs_dquot *);
typedef int (*xfs_dqattach_t)(struct xfs_inode *, uint);
Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.h
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:24:34.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:24:59.000000000 +0100
@@ -65,11 +65,6 @@ extern void vn_iowait(struct xfs_inode *
extern void vn_iowake(struct xfs_inode *ip);
extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l);
-static inline int vn_count(struct inode *vp)
-{
- return atomic_read(&vp->i_count);
-}
-
#define IHOLD(ip) \
do { \
ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 18/22] kill xfs_unmount_flush
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (16 preceding siblings ...)
2008-12-02 16:04 ` [patch 17/22] no explicit xfs_iflush for special inodes during unmount Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 3:08 ` Dave Chinner
2008-12-02 16:04 ` [patch 19/22] kill vn_ioerror Christoph Hellwig
` (4 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-kill-xfs_unmountfs_flush --]
[-- Type: text/plain, Size: 5687 bytes --]
There's almost nothing left in this function, instead remove the IRELE
on the real times inodes and the call to XFS_QM_UNMOUNT into xfs_unmountfs.
For the regular unmount case that means it now also happenes after dmapi
notification, but otherwise there is no difference in behaviour.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/xfs_mount.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_mount.c 2008-12-01 19:28:02.000000000 +0100
+++ xfs-master/fs/xfs/xfs_mount.c 2008-12-01 19:28:11.000000000 +0100
@@ -1220,6 +1220,16 @@ xfs_unmountfs(
__uint64_t resblks;
int error;
+ /*
+ * Release dquot that rootinode, rbmino and rsumino might be holding,
+ * and release the quota inodes.
+ */
+ XFS_QM_UNMOUNT(mp);
+
+ if (mp->m_rbmip)
+ IRELE(mp->m_rbmip);
+ if (mp->m_rsumip)
+ IRELE(mp->m_rsumip);
IRELE(mp->m_rootip);
/*
Index: xfs-master/fs/xfs/xfs_mount.h
===================================================================
--- xfs-master.orig/fs/xfs/xfs_mount.h 2008-12-01 19:28:08.000000000 +0100
+++ xfs-master/fs/xfs/xfs_mount.h 2008-12-01 19:28:11.000000000 +0100
@@ -510,7 +510,6 @@ extern void xfs_mountfs_check_barriers(x
extern void xfs_unmountfs(xfs_mount_t *);
extern int xfs_unmountfs_writesb(xfs_mount_t *);
-extern int xfs_unmount_flush(xfs_mount_t *, int);
extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int64_t, int);
extern int xfs_mod_incore_sb_unlocked(xfs_mount_t *, xfs_sb_field_t,
int64_t, int);
Index: xfs-master/fs/xfs/xfs_vfsops.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_vfsops.c 2008-12-01 19:28:07.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2000-2005 Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms 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. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-#include "xfs.h"
-#include "xfs_fs.h"
-#include "xfs_types.h"
-#include "xfs_bit.h"
-#include "xfs_log.h"
-#include "xfs_inum.h"
-#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_da_btree.h"
-#include "xfs_bmap_btree.h"
-#include "xfs_ialloc_btree.h"
-#include "xfs_alloc_btree.h"
-#include "xfs_dir2_sf.h"
-#include "xfs_attr_sf.h"
-#include "xfs_dinode.h"
-#include "xfs_inode.h"
-#include "xfs_inode_item.h"
-#include "xfs_btree.h"
-#include "xfs_alloc.h"
-#include "xfs_ialloc.h"
-#include "xfs_quota.h"
-#include "xfs_error.h"
-#include "xfs_bmap.h"
-#include "xfs_rw.h"
-#include "xfs_buf_item.h"
-#include "xfs_log_priv.h"
-#include "xfs_dir2_trace.h"
-#include "xfs_extfree_item.h"
-#include "xfs_acl.h"
-#include "xfs_attr.h"
-#include "xfs_mru_cache.h"
-#include "xfs_filestream.h"
-#include "xfs_fsops.h"
-#include "xfs_vnodeops.h"
-#include "xfs_utils.h"
-#include "xfs_sync.h"
-
-
-/*
- * xfs_unmount_flush implements a set of flush operation on special
- * inodes, which are needed as a separate set of operations so that
- * they can be called as part of relocation process.
- */
-int
-xfs_unmount_flush(
- xfs_mount_t *mp, /* Mount structure we are getting
- rid of. */
- int relocation) /* Called from vfs relocation. */
-{
- /*
- * Release dquot that rootinode, rbmino and rsumino might be holding,
- * flush and purge the quota inodes.
- */
- XFS_QM_UNMOUNT(mp);
-
- if (mp->m_rbmip)
- IRELE(mp->m_rbmip);
- if (mp->m_rsumip)
- IRELE(mp->m_rsumip);
-
- return 0;
-}
Index: xfs-master/fs/xfs/linux-2.6/xfs_super.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_super.c 2008-12-01 19:28:02.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_super.c 2008-12-01 19:28:11.000000000 +0100
@@ -1043,7 +1043,6 @@ xfs_fs_put_super(
struct xfs_mount *mp = XFS_M(sb);
struct xfs_inode *rip = mp->m_rootip;
int unmount_event_flags = 0;
- int error;
xfs_syncd_stop(mp);
xfs_sync_inodes(mp, SYNC_ATTR|SYNC_DELWRI);
@@ -1071,8 +1070,6 @@ xfs_fs_put_super(
xfs_filestream_unmount(mp);
XFS_bflush(mp->m_ddev_targp);
- error = xfs_unmount_flush(mp, 0);
- WARN_ON(error);
if (mp->m_flags & XFS_MOUNT_DMAPI) {
XFS_SEND_UNMOUNT(mp, rip, DM_RIGHT_NULL, 0, 0,
@@ -1535,8 +1532,6 @@ xfs_fs_fill_super(
xfs_filestream_unmount(mp);
XFS_bflush(mp->m_ddev_targp);
- error = xfs_unmount_flush(mp, 0);
- WARN_ON(error);
xfs_unmountfs(mp);
goto out_free_sb;
Index: xfs-master/fs/xfs/Makefile
===================================================================
--- xfs-master.orig/fs/xfs/Makefile 2008-12-01 19:26:35.000000000 +0100
+++ xfs-master/fs/xfs/Makefile 2008-12-01 19:28:11.000000000 +0100
@@ -85,7 +85,6 @@ xfs-y += xfs_alloc.o \
xfs_trans_inode.o \
xfs_trans_item.o \
xfs_utils.o \
- xfs_vfsops.o \
xfs_vnodeops.o \
xfs_rw.o \
xfs_dmops.o \
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 19/22] kill vn_ioerror
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (17 preceding siblings ...)
2008-12-02 16:04 ` [patch 18/22] kill xfs_unmount_flush Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 3:13 ` Dave Chinner
2008-12-02 16:04 ` [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c Christoph Hellwig
` (3 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-kill-vn_ioerror --]
[-- Type: text/plain, Size: 2799 bytes --]
There's just one caller of this helper, and it's much cleaner to just merge
the xfs_do_force_shutdown call into it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:24:34.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:26:38.000000000 +0100
@@ -146,16 +146,25 @@ xfs_destroy_ioend(
xfs_ioend_t *ioend)
{
struct buffer_head *bh, *next;
+ struct xfs_inode *ip = XFS_I(ioend->io_inode);
for (bh = ioend->io_buffer_head; bh; bh = next) {
next = bh->b_private;
bh->b_end_io(bh, !ioend->io_error);
}
- if (unlikely(ioend->io_error)) {
- vn_ioerror(XFS_I(ioend->io_inode), ioend->io_error,
- __FILE__,__LINE__);
+
+ /*
+ * Volume managers supporting multiple paths can send back ENODEV
+ * when the final path disappears. In this case continuing to fill
+ * the page cache with dirty data which cannot be written out is
+ * evil, so prevent that.
+ */
+ if (unlikely(ioend->io_error == -ENODEV)) {
+ xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ,
+ __FILE__, __LINE__);
}
- vn_iowake(XFS_I(ioend->io_inode));
+
+ vn_iowake(ip);
mempool_free(ioend, xfs_ioend_pool);
}
Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.c 2008-12-02 11:24:34.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.c 2008-12-02 11:26:38.000000000 +0100
@@ -66,22 +66,6 @@ vn_iowake(
wake_up(vptosync(ip));
}
-/*
- * Volume managers supporting multiple paths can send back ENODEV when the
- * final path disappears. In this case continuing to fill the page cache
- * with dirty data which cannot be written out is evil, so prevent that.
- */
-void
-vn_ioerror(
- xfs_inode_t *ip,
- int error,
- char *f,
- int l)
-{
- if (unlikely(error == -ENODEV))
- xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ, f, l);
-}
-
#ifdef XFS_INODE_TRACE
#define KTRACE_ENTER(ip, vk, s, line, ra) \
Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.h
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:24:59.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:26:38.000000000 +0100
@@ -63,7 +63,6 @@ extern void vn_init(void);
*/
extern void vn_iowait(struct xfs_inode *ip);
extern void vn_iowake(struct xfs_inode *ip);
-extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l);
#define IHOLD(ip) \
do { \
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (18 preceding siblings ...)
2008-12-02 16:04 ` [patch 19/22] kill vn_ioerror Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 3:17 ` Dave Chinner
2008-12-02 16:04 ` [patch 21/22] move inode tracing out of xfs_vnode Christoph Hellwig
` (2 subsequent siblings)
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-move-vn_iowait --]
[-- Type: text/plain, Size: 7274 bytes --]
The whole machinery to wait on I/O completion is related to the I/O path
and should be there instead of in xfs_vnode.c. Also give the functions
more descriptive names.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:26:38.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:26:47.000000000 +0100
@@ -42,6 +42,40 @@
#include <linux/pagevec.h>
#include <linux/writeback.h>
+
+/*
+ * Prime number of hash buckets since address is used as the key.
+ */
+#define NVSYNC 37
+#define to_ioend_wq(v) (&xfs_ioend_wq[((unsigned long)v) % NVSYNC])
+static wait_queue_head_t xfs_ioend_wq[NVSYNC];
+
+void __init
+xfs_ioend_init(void)
+{
+ int i;
+
+ for (i = 0; i < NVSYNC; i++)
+ init_waitqueue_head(&xfs_ioend_wq[i]);
+}
+
+void
+xfs_ioend_wait(
+ xfs_inode_t *ip)
+{
+ wait_queue_head_t *wq = to_ioend_wq(ip);
+
+ wait_event(*wq, (atomic_read(&ip->i_iocount) == 0));
+}
+
+STATIC void
+xfs_ioend_wake(
+ xfs_inode_t *ip)
+{
+ if (atomic_dec_and_test(&ip->i_iocount))
+ wake_up(to_ioend_wq(ip));
+}
+
STATIC void
xfs_count_page_state(
struct page *page,
@@ -164,7 +198,7 @@ xfs_destroy_ioend(
__FILE__, __LINE__);
}
- vn_iowake(ip);
+ xfs_ioend_wake(ip);
mempool_free(ioend, xfs_ioend_pool);
}
@@ -516,7 +550,7 @@ xfs_cancel_ioend(
unlock_buffer(bh);
} while ((bh = next_bh) != NULL);
- vn_iowake(XFS_I(ioend->io_inode));
+ xfs_ioend_wake(XFS_I(ioend->io_inode));
mempool_free(ioend, xfs_ioend_pool);
} while ((ioend = next) != NULL);
}
Index: xfs-master/fs/xfs/linux-2.6/xfs_aops.h
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_aops.h 2008-12-02 11:24:22.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_aops.h 2008-12-02 11:26:47.000000000 +0100
@@ -43,4 +43,7 @@ typedef struct xfs_ioend {
extern const struct address_space_operations xfs_address_space_operations;
extern int xfs_get_blocks(struct inode *, sector_t, struct buffer_head *, int);
+extern void xfs_ioend_init(void);
+extern void xfs_ioend_wait(struct xfs_inode *);
+
#endif /* __XFS_AOPS_H__ */
Index: xfs-master/fs/xfs/linux-2.6/xfs_super.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_super.c 2008-12-02 11:26:30.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_super.c 2008-12-02 11:26:47.000000000 +0100
@@ -1822,7 +1822,7 @@ init_xfs_fs(void)
XFS_BUILD_OPTIONS " enabled\n");
ktrace_init(64);
- vn_init();
+ xfs_ioend_init();
xfs_dir_startup();
error = xfs_init_zones();
Index: xfs-master/fs/xfs/linux-2.6/xfs_sync.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_sync.c 2008-12-02 11:24:22.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_sync.c 2008-12-02 11:26:47.000000000 +0100
@@ -133,7 +133,7 @@ xfs_sync_inodes_ag(
lock_flags |= XFS_IOLOCK_SHARED;
error = xfs_flush_pages(ip, 0, -1, fflag, FI_NONE);
if (flags & SYNC_IOWAIT)
- vn_iowait(ip);
+ xfs_ioend_wait(ip);
}
xfs_ilock(ip, XFS_ILOCK_SHARED);
Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.c 2008-12-02 11:26:38.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.c 2008-12-02 11:26:47.000000000 +0100
@@ -32,40 +32,6 @@
#include "xfs_mount.h"
-/*
- * Dedicated vnode inactive/reclaim sync wait queues.
- * Prime number of hash buckets since address is used as the key.
- */
-#define NVSYNC 37
-#define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC])
-static wait_queue_head_t vsync[NVSYNC];
-
-void __init
-vn_init(void)
-{
- int i;
-
- for (i = 0; i < NVSYNC; i++)
- init_waitqueue_head(&vsync[i]);
-}
-
-void
-vn_iowait(
- xfs_inode_t *ip)
-{
- wait_queue_head_t *wq = vptosync(ip);
-
- wait_event(*wq, (atomic_read(&ip->i_iocount) == 0));
-}
-
-void
-vn_iowake(
- xfs_inode_t *ip)
-{
- if (atomic_dec_and_test(&ip->i_iocount))
- wake_up(vptosync(ip));
-}
-
#ifdef XFS_INODE_TRACE
#define KTRACE_ENTER(ip, vk, s, line, ra) \
Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.h
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:26:38.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:26:47.000000000 +0100
@@ -54,16 +54,6 @@ struct attrlist_cursor_kern;
Prevent VM access to the pages until
the operation completes. */
-
-extern void vn_init(void);
-
-/*
- * Yeah, these don't take vnode anymore at all, all this should be
- * cleaned up at some point.
- */
-extern void vn_iowait(struct xfs_inode *ip);
-extern void vn_iowake(struct xfs_inode *ip);
-
#define IHOLD(ip) \
do { \
ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \
Index: xfs-master/fs/xfs/xfs_inode.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_inode.c 2008-12-02 11:24:22.000000000 +0100
+++ xfs-master/fs/xfs/xfs_inode.c 2008-12-02 11:26:47.000000000 +0100
@@ -1322,8 +1322,8 @@ xfs_itrunc_trace(
* direct I/O with the truncate operation. Also, because we hold
* the IOLOCK in exclusive mode, we prevent new direct I/Os from being
* started until the truncate completes and drops the lock. Essentially,
- * the vn_iowait() call forms an I/O barrier that provides strict ordering
- * between direct I/Os and the truncate operation.
+ * the xfs_ioend_wait() call forms an I/O barrier that provides strict
+ * ordering between direct I/Os and the truncate operation.
*
* The flags parameter can have either the value XFS_ITRUNC_DEFINITE
* or XFS_ITRUNC_MAYBE. The XFS_ITRUNC_MAYBE value should be used
@@ -1354,7 +1354,7 @@ xfs_itruncate_start(
/* wait for the completion of any pending DIOs */
if (new_size == 0 || new_size < ip->i_size)
- vn_iowait(ip);
+ xfs_ioend_wait(ip);
/*
* Call toss_pages or flushinval_pages to get rid of pages
Index: xfs-master/fs/xfs/xfs_vnodeops.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_vnodeops.c 2008-12-02 11:24:22.000000000 +0100
+++ xfs-master/fs/xfs/xfs_vnodeops.c 2008-12-02 11:26:47.000000000 +0100
@@ -338,7 +338,7 @@ xfs_setattr(
}
/* wait for all I/O to complete */
- vn_iowait(ip);
+ xfs_ioend_wait(ip);
if (!code)
code = xfs_itruncate_data(ip, iattr->ia_size);
@@ -2758,7 +2758,7 @@ xfs_reclaim(
return 0;
}
- vn_iowait(ip);
+ xfs_ioend_wait(ip);
ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0);
@@ -3149,7 +3149,8 @@ xfs_free_file_space(
need_iolock = 0;
if (need_iolock) {
xfs_ilock(ip, XFS_IOLOCK_EXCL);
- vn_iowait(ip); /* wait for the completion of any pending DIOs */
+ /* wait for the completion of any pending DIOs */
+ xfs_ioend_wait(ip);
}
rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE);
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 21/22] move inode tracing out of xfs_vnode.
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (19 preceding siblings ...)
2008-12-02 16:04 ` [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 3:18 ` Dave Chinner
2008-12-02 16:04 ` [patch 22/22] use inode_change_ok for setattr permission checking Christoph Hellwig
2008-12-03 17:13 ` [patch 00/22] 2.6.29 queue Christoph Hellwig
22 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-move-itrace --]
[-- Type: text/plain, Size: 9054 bytes --]
Move the inode tracing into xfs_iget.c / xfs_inode.h and kill xfs_vnode.c
now that it's empty.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/Makefile
===================================================================
--- xfs-master.orig/fs/xfs/Makefile 2008-12-02 11:26:30.000000000 +0100
+++ xfs-master/fs/xfs/Makefile 2008-12-02 11:27:01.000000000 +0100
@@ -107,7 +107,6 @@ xfs-y += $(addprefix $(XFS_LINUX)/, \
xfs_lrw.o \
xfs_super.o \
xfs_sync.o \
- xfs_vnode.o \
xfs_xattr.o)
# Objects in support/
Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.c 2008-12-02 11:26:47.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms 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. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-#include "xfs.h"
-#include "xfs_vnodeops.h"
-#include "xfs_bmap_btree.h"
-#include "xfs_inode.h"
-
-/*
- * And this gunk is needed for xfs_mount.h"
- */
-#include "xfs_log.h"
-#include "xfs_trans.h"
-#include "xfs_sb.h"
-#include "xfs_dmapi.h"
-#include "xfs_inum.h"
-#include "xfs_ag.h"
-#include "xfs_mount.h"
-
-
-#ifdef XFS_INODE_TRACE
-
-#define KTRACE_ENTER(ip, vk, s, line, ra) \
- ktrace_enter( (ip)->i_trace, \
-/* 0 */ (void *)(__psint_t)(vk), \
-/* 1 */ (void *)(s), \
-/* 2 */ (void *)(__psint_t) line, \
-/* 3 */ (void *)(__psint_t)atomic_read(&VFS_I(ip)->i_count), \
-/* 4 */ (void *)(ra), \
-/* 5 */ NULL, \
-/* 6 */ (void *)(__psint_t)current_cpu(), \
-/* 7 */ (void *)(__psint_t)current_pid(), \
-/* 8 */ (void *)__return_address, \
-/* 9 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL)
-
-/*
- * Vnode tracing code.
- */
-void
-_xfs_itrace_entry(xfs_inode_t *ip, const char *func, inst_t *ra)
-{
- KTRACE_ENTER(ip, INODE_KTRACE_ENTRY, func, 0, ra);
-}
-
-void
-_xfs_itrace_exit(xfs_inode_t *ip, const char *func, inst_t *ra)
-{
- KTRACE_ENTER(ip, INODE_KTRACE_EXIT, func, 0, ra);
-}
-
-void
-xfs_itrace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra)
-{
- KTRACE_ENTER(ip, INODE_KTRACE_HOLD, file, line, ra);
-}
-
-void
-_xfs_itrace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra)
-{
- KTRACE_ENTER(ip, INODE_KTRACE_REF, file, line, ra);
-}
-
-void
-xfs_itrace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra)
-{
- KTRACE_ENTER(ip, INODE_KTRACE_RELE, file, line, ra);
-}
-#endif /* XFS_INODE_TRACE */
Index: xfs-master/fs/xfs/xfs_iget.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_iget.c 2008-12-02 11:22:30.000000000 +0100
+++ xfs-master/fs/xfs/xfs_iget.c 2008-12-02 11:27:19.000000000 +0100
@@ -805,3 +805,51 @@ xfs_isilocked(
}
#endif
+#ifdef XFS_INODE_TRACE
+
+#define KTRACE_ENTER(ip, vk, s, line, ra) \
+ ktrace_enter((ip)->i_trace, \
+/* 0 */ (void *)(__psint_t)(vk), \
+/* 1 */ (void *)(s), \
+/* 2 */ (void *)(__psint_t) line, \
+/* 3 */ (void *)(__psint_t)atomic_read(&VFS_I(ip)->i_count), \
+/* 4 */ (void *)(ra), \
+/* 5 */ NULL, \
+/* 6 */ (void *)(__psint_t)current_cpu(), \
+/* 7 */ (void *)(__psint_t)current_pid(), \
+/* 8 */ (void *)__return_address, \
+/* 9 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL)
+
+/*
+ * Vnode tracing code.
+ */
+void
+_xfs_itrace_entry(xfs_inode_t *ip, const char *func, inst_t *ra)
+{
+ KTRACE_ENTER(ip, INODE_KTRACE_ENTRY, func, 0, ra);
+}
+
+void
+_xfs_itrace_exit(xfs_inode_t *ip, const char *func, inst_t *ra)
+{
+ KTRACE_ENTER(ip, INODE_KTRACE_EXIT, func, 0, ra);
+}
+
+void
+xfs_itrace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra)
+{
+ KTRACE_ENTER(ip, INODE_KTRACE_HOLD, file, line, ra);
+}
+
+void
+_xfs_itrace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra)
+{
+ KTRACE_ENTER(ip, INODE_KTRACE_REF, file, line, ra);
+}
+
+void
+xfs_itrace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra)
+{
+ KTRACE_ENTER(ip, INODE_KTRACE_RELE, file, line, ra);
+}
+#endif /* XFS_INODE_TRACE */
Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.h
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:26:47.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:27:01.000000000 +0100
@@ -54,19 +54,6 @@ struct attrlist_cursor_kern;
Prevent VM access to the pages until
the operation completes. */
-#define IHOLD(ip) \
-do { \
- ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \
- atomic_inc(&(VFS_I(ip)->i_count)); \
- xfs_itrace_hold((ip), __FILE__, __LINE__, (inst_t *)__return_address); \
-} while (0)
-
-#define IRELE(ip) \
-do { \
- xfs_itrace_rele((ip), __FILE__, __LINE__, (inst_t *)__return_address); \
- iput(VFS_I(ip)); \
-} while (0)
-
/*
* Dealing with bad inodes
*/
@@ -103,39 +90,4 @@ static inline void vn_atime_to_time_t(st
PAGECACHE_TAG_DIRTY)
-/*
- * Tracking vnode activity.
- */
-#if defined(XFS_INODE_TRACE)
-
-#define INODE_TRACE_SIZE 16 /* number of trace entries */
-#define INODE_KTRACE_ENTRY 1
-#define INODE_KTRACE_EXIT 2
-#define INODE_KTRACE_HOLD 3
-#define INODE_KTRACE_REF 4
-#define INODE_KTRACE_RELE 5
-
-extern void _xfs_itrace_entry(struct xfs_inode *, const char *, inst_t *);
-extern void _xfs_itrace_exit(struct xfs_inode *, const char *, inst_t *);
-extern void xfs_itrace_hold(struct xfs_inode *, char *, int, inst_t *);
-extern void _xfs_itrace_ref(struct xfs_inode *, char *, int, inst_t *);
-extern void xfs_itrace_rele(struct xfs_inode *, char *, int, inst_t *);
-#define xfs_itrace_entry(ip) \
- _xfs_itrace_entry(ip, __func__, (inst_t *)__return_address)
-#define xfs_itrace_exit(ip) \
- _xfs_itrace_exit(ip, __func__, (inst_t *)__return_address)
-#define xfs_itrace_exit_tag(ip, tag) \
- _xfs_itrace_exit(ip, tag, (inst_t *)__return_address)
-#define xfs_itrace_ref(ip) \
- _xfs_itrace_ref(ip, __FILE__, __LINE__, (inst_t *)__return_address)
-
-#else
-#define xfs_itrace_entry(a)
-#define xfs_itrace_exit(a)
-#define xfs_itrace_exit_tag(a, b)
-#define xfs_itrace_hold(a, b, c, d)
-#define xfs_itrace_ref(a)
-#define xfs_itrace_rele(a, b, c, d)
-#endif
-
#endif /* __XFS_VNODE_H__ */
Index: xfs-master/fs/xfs/xfs_inode.h
===================================================================
--- xfs-master.orig/fs/xfs/xfs_inode.h 2008-12-02 11:22:30.000000000 +0100
+++ xfs-master/fs/xfs/xfs_inode.h 2008-12-02 11:27:01.000000000 +0100
@@ -536,6 +536,51 @@ void xfs_lock_two_inodes(xfs_inode_t *,
void xfs_synchronize_atime(xfs_inode_t *);
void xfs_mark_inode_dirty_sync(xfs_inode_t *);
+#if defined(XFS_INODE_TRACE)
+
+#define INODE_TRACE_SIZE 16 /* number of trace entries */
+#define INODE_KTRACE_ENTRY 1
+#define INODE_KTRACE_EXIT 2
+#define INODE_KTRACE_HOLD 3
+#define INODE_KTRACE_REF 4
+#define INODE_KTRACE_RELE 5
+
+extern void _xfs_itrace_entry(struct xfs_inode *, const char *, inst_t *);
+extern void _xfs_itrace_exit(struct xfs_inode *, const char *, inst_t *);
+extern void xfs_itrace_hold(struct xfs_inode *, char *, int, inst_t *);
+extern void _xfs_itrace_ref(struct xfs_inode *, char *, int, inst_t *);
+extern void xfs_itrace_rele(struct xfs_inode *, char *, int, inst_t *);
+#define xfs_itrace_entry(ip) \
+ _xfs_itrace_entry(ip, __func__, (inst_t *)__return_address)
+#define xfs_itrace_exit(ip) \
+ _xfs_itrace_exit(ip, __func__, (inst_t *)__return_address)
+#define xfs_itrace_exit_tag(ip, tag) \
+ _xfs_itrace_exit(ip, tag, (inst_t *)__return_address)
+#define xfs_itrace_ref(ip) \
+ _xfs_itrace_ref(ip, __FILE__, __LINE__, (inst_t *)__return_address)
+
+#else
+#define xfs_itrace_entry(a)
+#define xfs_itrace_exit(a)
+#define xfs_itrace_exit_tag(a, b)
+#define xfs_itrace_hold(a, b, c, d)
+#define xfs_itrace_ref(a)
+#define xfs_itrace_rele(a, b, c, d)
+#endif
+
+#define IHOLD(ip) \
+do { \
+ ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \
+ atomic_inc(&(VFS_I(ip)->i_count)); \
+ xfs_itrace_hold((ip), __FILE__, __LINE__, (inst_t *)__return_address); \
+} while (0)
+
+#define IRELE(ip) \
+do { \
+ xfs_itrace_rele((ip), __FILE__, __LINE__, (inst_t *)__return_address); \
+ iput(VFS_I(ip)); \
+} while (0)
+
#endif /* __KERNEL__ */
int xfs_inotobp(struct xfs_mount *, struct xfs_trans *,
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* [patch 22/22] use inode_change_ok for setattr permission checking
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (20 preceding siblings ...)
2008-12-02 16:04 ` [patch 21/22] move inode tracing out of xfs_vnode Christoph Hellwig
@ 2008-12-02 16:04 ` Christoph Hellwig
2008-12-03 17:13 ` [patch 00/22] 2.6.29 queue Christoph Hellwig
22 siblings, 0 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-02 16:04 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-setattr-use-inode_change_ok --]
[-- Type: text/plain, Size: 6531 bytes --]
Instead of implementing our own checks use inode_change_ok to check for
necessary permission in setattr. There is a slight change in behaviour
as inode_change_ok doesn't allow i_mode updates to add the suid or sgid
without superuser privilegues while the old XFS code just stripped away
those bits from the file mode.
(First sent on Semptember 29th)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-master/fs/xfs/xfs_vnodeops.c
===================================================================
--- xfs-master.orig/fs/xfs/xfs_vnodeops.c 2008-12-02 14:00:52.000000000 +0100
+++ xfs-master/fs/xfs/xfs_vnodeops.c 2008-12-02 14:00:52.000000000 +0100
@@ -70,7 +70,6 @@ xfs_setattr(
gid_t gid=0, igid=0;
int timeflags = 0;
struct xfs_dquot *udqp, *gdqp, *olddquot1, *olddquot2;
- int file_owner;
int need_iolock = 1;
xfs_itrace_entry(ip);
@@ -81,6 +80,10 @@ xfs_setattr(
if (XFS_FORCED_SHUTDOWN(mp))
return XFS_ERROR(EIO);
+ code = -inode_change_ok(inode, iattr);
+ if (code)
+ return code;
+
olddquot1 = olddquot2 = NULL;
udqp = gdqp = NULL;
@@ -158,56 +161,6 @@ xfs_setattr(
xfs_ilock(ip, lock_flags);
- /* boolean: are we the file owner? */
- file_owner = (current_fsuid() == ip->i_d.di_uid);
-
- /*
- * Change various properties of a file.
- * Only the owner or users with CAP_FOWNER
- * capability may do these things.
- */
- if (mask & (ATTR_MODE|ATTR_UID|ATTR_GID)) {
- /*
- * CAP_FOWNER overrides the following restrictions:
- *
- * The user ID of the calling process must be equal
- * to the file owner ID, except in cases where the
- * CAP_FSETID capability is applicable.
- */
- if (!file_owner && !capable(CAP_FOWNER)) {
- code = XFS_ERROR(EPERM);
- goto error_return;
- }
-
- /*
- * CAP_FSETID overrides the following restrictions:
- *
- * The effective user ID of the calling process shall match
- * the file owner when setting the set-user-ID and
- * set-group-ID bits on that file.
- *
- * The effective group ID or one of the supplementary group
- * IDs of the calling process shall match the group owner of
- * the file when setting the set-group-ID bit on that file
- */
- if (mask & ATTR_MODE) {
- mode_t m = 0;
-
- if ((iattr->ia_mode & S_ISUID) && !file_owner)
- m |= S_ISUID;
- if ((iattr->ia_mode & S_ISGID) &&
- !in_group_p((gid_t)ip->i_d.di_gid))
- m |= S_ISGID;
-#if 0
- /* Linux allows this, Irix doesn't. */
- if ((iattr->ia_mode & S_ISVTX) && !S_ISDIR(ip->i_d.di_mode))
- m |= S_ISVTX;
-#endif
- if (m && !capable(CAP_FSETID))
- iattr->ia_mode &= ~m;
- }
- }
-
/*
* Change file ownership. Must be the owner or privileged.
*/
@@ -224,22 +177,6 @@ xfs_setattr(
uid = (mask & ATTR_UID) ? iattr->ia_uid : iuid;
/*
- * CAP_CHOWN overrides the following restrictions:
- *
- * If _POSIX_CHOWN_RESTRICTED is defined, this capability
- * shall override the restriction that a process cannot
- * change the user ID of a file it owns and the restriction
- * that the group ID supplied to the chown() function
- * shall be equal to either the group ID or one of the
- * supplementary group IDs of the calling process.
- */
- if ((iuid != uid ||
- (igid != gid && !in_group_p((gid_t)gid))) &&
- !capable(CAP_CHOWN)) {
- code = XFS_ERROR(EPERM);
- goto error_return;
- }
- /*
* Do a quota reservation only if uid/gid is actually
* going to change.
*/
@@ -276,36 +213,22 @@ xfs_setattr(
code = XFS_ERROR(EINVAL);
goto error_return;
}
+
/*
* Make sure that the dquots are attached to the inode.
*/
- if ((code = XFS_QM_DQATTACH(mp, ip, XFS_QMOPT_ILOCKED)))
+ code = XFS_QM_DQATTACH(mp, ip, XFS_QMOPT_ILOCKED);
+ if (code)
goto error_return;
- }
-
- /*
- * Change file access or modified times.
- */
- if (mask & (ATTR_ATIME|ATTR_MTIME)) {
- if (!file_owner) {
- if ((mask & (ATTR_MTIME_SET|ATTR_ATIME_SET)) &&
- !capable(CAP_FOWNER)) {
- code = XFS_ERROR(EPERM);
- goto error_return;
- }
- }
- }
- /*
- * Now we can make the changes. Before we join the inode
- * to the transaction, if ATTR_SIZE is set then take care of
- * the part of the truncation that must be done without the
- * inode lock. This needs to be done before joining the inode
- * to the transaction, because the inode cannot be unlocked
- * once it is a part of the transaction.
- */
- if (mask & ATTR_SIZE) {
- code = 0;
+ /*
+ * Now we can make the changes. Before we join the inode
+ * to the transaction, if ATTR_SIZE is set then take care of
+ * the part of the truncation that must be done without the
+ * inode lock. This needs to be done before joining the inode
+ * to the transaction, because the inode cannot be unlocked
+ * once it is a part of the transaction.
+ */
if (iattr->ia_size > ip->i_size) {
/*
* Do the first part of growing a file: zero any data
@@ -360,17 +283,10 @@ xfs_setattr(
}
commit_flags = XFS_TRANS_RELEASE_LOG_RES;
xfs_ilock(ip, XFS_ILOCK_EXCL);
- }
- if (tp) {
xfs_trans_ijoin(tp, ip, lock_flags);
xfs_trans_ihold(tp, ip);
- }
- /*
- * Truncate file. Must have write permission and not be a directory.
- */
- if (mask & ATTR_SIZE) {
/*
* Only change the c/mtime if we are changing the size
* or we are explicitly asked to change it. This handles
@@ -410,20 +326,9 @@ xfs_setattr(
*/
xfs_iflags_set(ip, XFS_ITRUNCATED);
}
- }
-
- /*
- * Change file access modes.
- */
- if (mask & ATTR_MODE) {
- ip->i_d.di_mode &= S_IFMT;
- ip->i_d.di_mode |= iattr->ia_mode & ~S_IFMT;
-
- inode->i_mode &= S_IFMT;
- inode->i_mode |= iattr->ia_mode & ~S_IFMT;
-
- xfs_trans_log_inode (tp, ip, XFS_ILOG_CORE);
- timeflags |= XFS_ICHGTIME_CHG;
+ } else if (tp) {
+ xfs_trans_ijoin(tp, ip, lock_flags);
+ xfs_trans_ihold(tp, ip);
}
/*
@@ -471,6 +376,24 @@ xfs_setattr(
timeflags |= XFS_ICHGTIME_CHG;
}
+ /*
+ * Change file access modes.
+ */
+ if (mask & ATTR_MODE) {
+ umode_t mode = iattr->ia_mode;
+
+ if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
+ mode &= ~S_ISGID;
+
+ ip->i_d.di_mode &= S_IFMT;
+ ip->i_d.di_mode |= mode & ~S_IFMT;
+
+ inode->i_mode &= S_IFMT;
+ inode->i_mode |= mode & ~S_IFMT;
+
+ xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
+ timeflags |= XFS_ICHGTIME_CHG;
+ }
/*
* Change file access or modified times.
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 01/22] fix compile on 32 bit systems
2008-12-02 16:04 ` [patch 01/22] fix compile on 32 bit systems Christoph Hellwig
@ 2008-12-02 16:43 ` Eric Sandeen
2008-12-03 2:20 ` Eric Sandeen
2008-12-04 1:03 ` Niv Sardi
2 siblings, 0 replies; 61+ messages in thread
From: Eric Sandeen @ 2008-12-02 16:43 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
ACK on this. I ran into this too on a backport but didn't think it was
a problem upstream, thanks!
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 02/22] remove useless mnt_want_write call in xfs_write
2008-12-02 16:04 ` [patch 02/22] remove useless mnt_want_write call in xfs_write Christoph Hellwig
@ 2008-12-03 2:11 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 2:11 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:32AM -0500, Christoph Hellwig wrote:
>
> When mnt_want_write was introduced a call to it was added around
> xfs_ichgtime, but there is no need for this because a file can't be open
> read/write on a r/o mount, and a mount can't degrade r/o while we still
> have files open for writing. As the mnt_want_write changes were never
> merged into the CVS tree this patch is for mainline only.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 03/22] remove unused behvavior cruft in xfs_super.h
2008-12-02 16:04 ` [patch 03/22] remove unused behvavior cruft in xfs_super.h Christoph Hellwig
@ 2008-12-03 2:12 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 2:12 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:33AM -0500, Christoph Hellwig wrote:
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free
2008-12-02 16:04 ` [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free Christoph Hellwig
@ 2008-12-03 2:13 ` Dave Chinner
2008-12-03 2:22 ` Eric Sandeen
1 sibling, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 2:13 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:34AM -0500, Christoph Hellwig wrote:
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
I must have missed these when removing the ihash....
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 01/22] fix compile on 32 bit systems
2008-12-02 16:04 ` [patch 01/22] fix compile on 32 bit systems Christoph Hellwig
2008-12-02 16:43 ` Eric Sandeen
@ 2008-12-03 2:20 ` Eric Sandeen
2008-12-04 1:03 ` Niv Sardi
2 siblings, 0 replies; 61+ messages in thread
From: Eric Sandeen @ 2008-12-03 2:20 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
(to be formal about it)
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free
2008-12-02 16:04 ` [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free Christoph Hellwig
2008-12-03 2:13 ` Dave Chinner
@ 2008-12-03 2:22 ` Eric Sandeen
1 sibling, 0 replies; 61+ messages in thread
From: Eric Sandeen @ 2008-12-03 2:22 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 05/22] cleanup the inode reclaim path
2008-12-02 16:04 ` [patch 05/22] cleanup the inode reclaim path Christoph Hellwig
@ 2008-12-03 2:29 ` Dave Chinner
2008-12-03 10:53 ` Christoph Hellwig
0 siblings, 1 reply; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 2:29 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:35AM -0500, Christoph Hellwig wrote:
> Merge xfs_iextract and xfs_idestory into xfs_ireclaim as they are never
xfs_idestroy
> called individually. Also rewrite most comments in this area as they
> were serverly out of date.
severely
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: xfs-master/fs/xfs/xfs_iget.c
> ===================================================================
> --- xfs-master.orig/fs/xfs/xfs_iget.c 2008-12-01 19:26:04.000000000 +0100
> +++ xfs-master/fs/xfs/xfs_iget.c 2008-12-01 19:27:15.000000000 +0100
> @@ -450,65 +450,109 @@ xfs_iput_new(
> IRELE(ip);
> }
>
> -
> /*
> - * This routine embodies the part of the reclaim code that pulls
> - * the inode from the inode hash table and the mount structure's
> - * inode list.
> - * This should only be called from xfs_reclaim().
> + * This is called free all the memory associated with an inode.
* xfs_ireclaim is called to free....
> + * It must free the inode itself and any buffers allocated for
> + * if_extents/if_data and if_broot. It must also free the lock
> + * associated with the inode.
> + *
> + * Note: because we don't initialise everything on reallocation out
> + * of the zone, we must ensure we nullify everything correctly before
> + * freeing the structure.
> */
> void
> -xfs_ireclaim(xfs_inode_t *ip)
> +xfs_ireclaim(
> + struct xfs_inode *ip)
> {
> - /*
> - * Remove from old hash list and mount list.
> - */
> - XFS_STATS_INC(xs_ig_reclaims);
> + struct xfs_mount *mp = ip->i_mount;
> + struct xfs_perag *pag;
>
> - xfs_iextract(ip);
> + XFS_STATS_INC(xs_ig_reclaims);
>
> /*
> - * Here we do a spurious inode lock in order to coordinate with inode
> - * cache radix tree lookups. This is because the lookup can reference
> - * the inodes in the cache without taking references. We make that OK
> - * here by ensuring that we wait until the inode is unlocked after the
> - * lookup before we go ahead and free it. We get both the ilock and
> - * the iolock because the code may need to drop the ilock one but will
> - * still hold the iolock.
> + * Remove the inode from the per-AG radix tree. It doesn't matter
> + * if it was never added to it because radix_tree_delete can deal
> + * with that case just fine.
> */
> - xfs_ilock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> + pag = xfs_get_perag(mp, ip->i_ino);
> + write_lock(&pag->pag_ici_lock);
> + radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino));
> + write_unlock(&pag->pag_ici_lock);
> + xfs_put_perag(mp, pag);
>
> /*
> - * Release dquots (and their references) if any. An inode may escape
> - * xfs_inactive and get here via vn_alloc->vn_reclaim path.
> + * Here we do an (almost) spurious inode lock in order to coordinate
> + * with inode cache radix tree lookups. This is because the lookup
> + * can reference the inodes in the cache without taking references.
> + *
> + * We make that OK here by ensuring that we wait until the inode is
> + * unlocked after the lookup before we go ahead and free it. We get
> + * both the ilock and the iolock because the code may need to drop the
> + * ilock one but will still hold the iolock.
> */
Hmmm - I need to check if this is still true. We now use igrab() to
get a reference on all lookups except the reclaim lookup. In the
case of a racing reclaim lookup, we check for the reclaim
flags on the inode after the lookup but before we try to lock the
inode. Hence this lock check probably doesn't do anything anymore,
but I need to look a bit closer....
Other than the typos, the code looks ok, so:
Reviewed-by: Dave Chinner <david@fromorbit.com>
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 06/22] kill xfs_buf_iostart
2008-12-02 16:04 ` [patch 06/22] kill xfs_buf_iostart Christoph Hellwig
@ 2008-12-03 2:37 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 2:37 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:36AM -0500, Christoph Hellwig wrote:
> xfs_buf_iostart is a "shared" helper for xfs_buf_read_flags,
> xfs_bawrite, and xfs_bdwrite - except that there isn't much shared
> code but rather special cases for each caller.
>
> So remove this function and move the functionality to the caller.
> xfs_bawrite and xfs_bdwrite are now big enough to be moved out of
> line and the xfs_buf_read_flags is moved into a new helper called
> _xfs_buf_read.
>
> (First sent on August 2nd)
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 07/22] stop using igrab in xfs_vn_link
2008-12-02 16:04 ` [patch 07/22] stop using igrab in xfs_vn_link Christoph Hellwig
@ 2008-12-03 2:39 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 2:39 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:37AM -0500, Christoph Hellwig wrote:
> ->link is guranteed to get an already reference inode passed so we
> can do a simple increment of i_count instead of using igrab and thus
> avoid banging on the global inode_lock. This is what most filesystems
> already do.
>
> Also move the increment after the call to xfs_link to simplify error
> handling.
>
> (First sent on July 26th)
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 08/22] reduce l_icloglock roundtrips
2008-12-02 16:04 ` [patch 08/22] reduce l_icloglock roundtrips Christoph Hellwig
@ 2008-12-03 2:56 ` Dave Chinner
2008-12-03 10:51 ` Christoph Hellwig
0 siblings, 1 reply; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 2:56 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:38AM -0500, Christoph Hellwig wrote:
> All but one caller of xlog_state_want_sync drop and re-acquire
> l_icloglock around the call to it, just so that xlog_state_want_sync can
> acquire and drop it.
Not really a performance problem, though, because the one caller
that doesn't already hold the lock is the common path (i.e.
xlog_write()); the others are in the unmount path, so lock traffic
is not there is not performance critical....
Hence I'm not sure this is really necessary.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 09/22] remove dead code from sv_t implementation
2008-12-02 16:04 ` [patch 09/22] remove dead code from sv_t implementation Christoph Hellwig
@ 2008-12-03 2:56 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 2:56 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:39AM -0500, Christoph Hellwig wrote:
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 10/22] kill dead quota flags
2008-12-02 16:04 ` [patch 10/22] kill dead quota flags Christoph Hellwig
@ 2008-12-03 2:57 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 2:57 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:40AM -0500, Christoph Hellwig wrote:
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 12/22] kill dead inode flags
2008-12-02 16:04 ` [patch 12/22] kill dead inode flags Christoph Hellwig
@ 2008-12-03 2:59 ` Dave Chinner
2008-12-04 2:24 ` Niv Sardi
1 sibling, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 2:59 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:42AM -0500, Christoph Hellwig wrote:
> There are a few inode flags around that aren't used anywhere, so remove
> them. Also update xfsidbg to display all used inode flags correctly.
>
> (First sent on July 23nd)
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 13/22] remove unused m_inode_quiesce member from struct xfs_mount
2008-12-02 16:04 ` [patch 13/22] remove unused m_inode_quiesce member from struct xfs_mount Christoph Hellwig
@ 2008-12-03 2:59 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 2:59 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:43AM -0500, Christoph Hellwig wrote:
> (First sent on July 23rd)
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 14/22] remove leftovers of shared read-only support
2008-12-02 16:04 ` [patch 14/22] remove leftovers of shared read-only support Christoph Hellwig
@ 2008-12-03 3:01 ` Dave Chinner
2008-12-03 10:57 ` Christoph Hellwig
0 siblings, 1 reply; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 3:01 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:44AM -0500, Christoph Hellwig wrote:
> We never supported shared read-only filesystems, so remove the dead
> code left over from IRIX for it.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
......
> - if (!ronly || !(mp->m_sb.sb_flags & XFS_SBF_READONLY) ||
> - (mp->m_sb.sb_shared_vn != 0))
> - return XFS_ERROR(EINVAL);
> -
> - mp->m_flags |= XFS_MOUNT_SHARED;
You can kill XFS_MOUNT_SHARED from xfs_mount.h as well.
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 16/22] use xfs_trans_ijoin in xfs_trans_iget
2008-12-02 16:04 ` [patch 16/22] use xfs_trans_ijoin in xfs_trans_iget Christoph Hellwig
@ 2008-12-03 3:03 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 3:03 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:46AM -0500, Christoph Hellwig wrote:
> Use xfs_trans_ijoin in xfs_trans_iget in case we need to join an inode into
> a transaction instead of opencoding it. Based on a discussion with and an
> incomplete patch from Niv Sardi.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 17/22] no explicit xfs_iflush for special inodes during unmount
2008-12-02 16:04 ` [patch 17/22] no explicit xfs_iflush for special inodes during unmount Christoph Hellwig
@ 2008-12-03 3:06 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 3:06 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:47AM -0500, Christoph Hellwig wrote:
> Currently we explicitly call xfs_iflush on the quota, real-time and root
> inodes from xfs_unmount_flush. But we just called xfs_sync_inodes with
> SYNC_ATTR and do an XFS_bflush aka xfs_flush_buftarg to make sure all inodes
> are on disk already, so there is no need for these special cases.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 18/22] kill xfs_unmount_flush
2008-12-02 16:04 ` [patch 18/22] kill xfs_unmount_flush Christoph Hellwig
@ 2008-12-03 3:08 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 3:08 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:48AM -0500, Christoph Hellwig wrote:
> There's almost nothing left in this function, instead remove the IRELE
> on the real times inodes and the call to XFS_QM_UNMOUNT into xfs_unmountfs.
>
> For the regular unmount case that means it now also happenes after dmapi
> notification, but otherwise there is no difference in behaviour.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 19/22] kill vn_ioerror
2008-12-02 16:04 ` [patch 19/22] kill vn_ioerror Christoph Hellwig
@ 2008-12-03 3:13 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 3:13 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:49AM -0500, Christoph Hellwig wrote:
> There's just one caller of this helper, and it's much cleaner to just merge
> the xfs_do_force_shutdown call into it.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c
2008-12-02 16:04 ` [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c Christoph Hellwig
@ 2008-12-03 3:17 ` Dave Chinner
2008-12-03 10:58 ` Christoph Hellwig
0 siblings, 1 reply; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 3:17 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:50AM -0500, Christoph Hellwig wrote:
> The whole machinery to wait on I/O completion is related to the I/O path
> and should be there instead of in xfs_vnode.c. Also give the functions
> more descriptive names.
I'm not sure that "xfs_ioend_..." is the best name - it looks
slightly weird in some of the callers' contexts. Just dropping the
"end" out of the names makes the code read much better (i.e.
xfs_io_wait() and xfs_io_wake()). Not particularly important,
though, and everything else looks good.
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 21/22] move inode tracing out of xfs_vnode.
2008-12-02 16:04 ` [patch 21/22] move inode tracing out of xfs_vnode Christoph Hellwig
@ 2008-12-03 3:18 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 3:18 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:51AM -0500, Christoph Hellwig wrote:
> Move the inode tracing into xfs_iget.c / xfs_inode.h and kill xfs_vnode.c
> now that it's empty.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 11/22] cleanup xfs_sb.h feature flag helpers
2008-12-02 16:04 ` [patch 11/22] cleanup xfs_sb.h feature flag helpers Christoph Hellwig
@ 2008-12-03 6:26 ` Donald Douwsma
2008-12-03 10:52 ` Christoph Hellwig
0 siblings, 1 reply; 61+ messages in thread
From: Donald Douwsma @ 2008-12-03 6:26 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig wrote:
Looks ok, I think all these used to be macros, but when they got cleaned up
a lot of grogens were left in place. I wish we could get all this kind of thing
cleaned up right first time...
Reviewed-by: Donald Douwsma <donaldd@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 08/22] reduce l_icloglock roundtrips
2008-12-03 2:56 ` Dave Chinner
@ 2008-12-03 10:51 ` Christoph Hellwig
0 siblings, 0 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-03 10:51 UTC (permalink / raw)
To: Christoph Hellwig, xfs
On Wed, Dec 03, 2008 at 01:56:14PM +1100, Dave Chinner wrote:
> On Tue, Dec 02, 2008 at 11:04:38AM -0500, Christoph Hellwig wrote:
> > All but one caller of xlog_state_want_sync drop and re-acquire
> > l_icloglock around the call to it, just so that xlog_state_want_sync can
> > acquire and drop it.
>
> Not really a performance problem, though, because the one caller
> that doesn't already hold the lock is the common path (i.e.
> xlog_write()); the others are in the unmount path, so lock traffic
> is not there is not performance critical....
>
> Hence I'm not sure this is really necessary.
I don't think it's absolutely nessecary, but it's a lot cleaner this
way..
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 11/22] cleanup xfs_sb.h feature flag helpers
2008-12-03 6:26 ` Donald Douwsma
@ 2008-12-03 10:52 ` Christoph Hellwig
0 siblings, 0 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-03 10:52 UTC (permalink / raw)
To: Donald Douwsma; +Cc: xfs
On Wed, Dec 03, 2008 at 05:26:16PM +1100, Donald Douwsma wrote:
> Christoph Hellwig wrote:
>
> Looks ok, I think all these used to be macros, but when they got cleaned up
> a lot of grogens were left in place. I wish we could get all this kind of thing
> cleaned up right first time...
I think this was Nathan's big sweap to kill xfs_macros.[ch] for the ugly
marcros turning into macros calling functions calling the original macro
crap. He did this in some sort of scripted way and a lot of things like
this were left in place.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 05/22] cleanup the inode reclaim path
2008-12-03 2:29 ` Dave Chinner
@ 2008-12-03 10:53 ` Christoph Hellwig
0 siblings, 0 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-03 10:53 UTC (permalink / raw)
To: Christoph Hellwig, xfs
On Wed, Dec 03, 2008 at 01:29:50PM +1100, Dave Chinner wrote:
> On Tue, Dec 02, 2008 at 11:04:35AM -0500, Christoph Hellwig wrote:
> > Merge xfs_iextract and xfs_idestory into xfs_ireclaim as they are never
> xfs_idestroy
> > called individually. Also rewrite most comments in this area as they
> > were serverly out of date.
> severely
Thanks, updated the comments.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 14/22] remove leftovers of shared read-only support
2008-12-03 3:01 ` Dave Chinner
@ 2008-12-03 10:57 ` Christoph Hellwig
0 siblings, 0 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-03 10:57 UTC (permalink / raw)
To: Christoph Hellwig, xfs
On Wed, Dec 03, 2008 at 02:01:28PM +1100, Dave Chinner wrote:
> You can kill XFS_MOUNT_SHARED from xfs_mount.h as well.
Thanks, updated.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c
2008-12-03 3:17 ` Dave Chinner
@ 2008-12-03 10:58 ` Christoph Hellwig
2008-12-03 21:48 ` Dave Chinner
0 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-03 10:58 UTC (permalink / raw)
To: Christoph Hellwig, xfs
On Wed, Dec 03, 2008 at 02:17:19PM +1100, Dave Chinner wrote:
> On Tue, Dec 02, 2008 at 11:04:50AM -0500, Christoph Hellwig wrote:
> > The whole machinery to wait on I/O completion is related to the I/O path
> > and should be there instead of in xfs_vnode.c. Also give the functions
> > more descriptive names.
>
> I'm not sure that "xfs_ioend_..." is the best name - it looks
> slightly weird in some of the callers' contexts. Just dropping the
> "end" out of the names makes the code read much better (i.e.
> xfs_io_wait() and xfs_io_wake()). Not particularly important,
> though, and everything else looks good.
xfs_ioend_* wasn't my first choice either. I first did
xfs_iowait/xfs_iowake, but that clashes with the buffercache. And
having names just different by an underscore doesn't seem good either.
Any other suggestions?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 15/22] replace b_fspriv with b_mount
2008-12-02 16:04 ` [patch 15/22] replace b_fspriv with b_mount Christoph Hellwig
@ 2008-12-03 14:03 ` Christoph Hellwig
2008-12-03 21:54 ` Dave Chinner
1 sibling, 0 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-03 14:03 UTC (permalink / raw)
To: xfs
Any chance to get this one reviewed?
On Tue, Dec 02, 2008 at 11:04:45AM -0500, Christoph Hellwig wrote:
> Replace the b_fspriv pointer and it's ugly accessors with a properly types
> xfs_mount pointer. Also switch log reocvery over to it instead of using
> b_fspriv for the mount pointer.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_buf.c 2008-11-15 15:27:32.000000000 +0100
> +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.c 2008-11-15 15:28:01.000000000 +0100
> @@ -1085,7 +1085,7 @@ xfs_bawrite(
> bp->b_flags &= ~(XBF_READ | XBF_DELWRI | XBF_READ_AHEAD);
> bp->b_flags |= (XBF_WRITE | XBF_ASYNC | _XBF_RUN_QUEUES);
>
> - bp->b_fspriv3 = mp;
> + bp->b_mount = mp;
> bp->b_strat = xfs_bdstrat_cb;
> return xfs_bdstrat_cb(bp);
> }
> @@ -1098,7 +1098,7 @@ xfs_bdwrite(
> XB_TRACE(bp, "bdwrite", 0);
>
> bp->b_strat = xfs_bdstrat_cb;
> - bp->b_fspriv3 = mp;
> + bp->b_mount = mp;
>
> bp->b_flags &= ~XBF_READ;
> bp->b_flags |= (XBF_DELWRI | XBF_ASYNC);
> Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.h
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_buf.h 2008-11-15 15:28:08.000000000 +0100
> +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.h 2008-11-15 15:29:12.000000000 +0100
> @@ -168,7 +168,7 @@ typedef struct xfs_buf {
> struct completion b_iowait; /* queue for I/O waiters */
> void *b_fspriv;
> void *b_fspriv2;
> - void *b_fspriv3;
> + struct xfs_mount *b_mount;
> unsigned short b_error; /* error code on I/O */
> unsigned int b_page_count; /* size of page array */
> unsigned int b_offset; /* page offset in first page */
> @@ -335,8 +335,6 @@ extern void xfs_buf_trace(xfs_buf_t *, c
> #define XFS_BUF_SET_FSPRIVATE(bp, val) ((bp)->b_fspriv = (void*)(val))
> #define XFS_BUF_FSPRIVATE2(bp, type) ((type)(bp)->b_fspriv2)
> #define XFS_BUF_SET_FSPRIVATE2(bp, val) ((bp)->b_fspriv2 = (void*)(val))
> -#define XFS_BUF_FSPRIVATE3(bp, type) ((type)(bp)->b_fspriv3)
> -#define XFS_BUF_SET_FSPRIVATE3(bp, val) ((bp)->b_fspriv3 = (void*)(val))
> #define XFS_BUF_SET_START(bp) do { } while (0)
> #define XFS_BUF_SET_BRELSE_FUNC(bp, func) ((bp)->b_relse = (func))
>
> Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.c 2008-11-15 15:25:29.000000000 +0100
> +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2008-11-15 15:26:27.000000000 +0100
> @@ -847,13 +847,7 @@ retry:
> int
> xfs_bdstrat_cb(struct xfs_buf *bp)
> {
> - xfs_mount_t *mp;
> -
> - mp = XFS_BUF_FSPRIVATE3(bp, xfs_mount_t *);
> - if (!XFS_FORCED_SHUTDOWN(mp)) {
> - xfs_buf_iorequest(bp);
> - return 0;
> - } else {
> + if (XFS_FORCED_SHUTDOWN(bp->b_mount)) {
> xfs_buftrace("XFS__BDSTRAT IOERROR", bp);
> /*
> * Metadata write that didn't get logged but
> @@ -866,6 +860,9 @@ xfs_bdstrat_cb(struct xfs_buf *bp)
> else
> return (xfs_bioerror(bp));
> }
> +
> + xfs_buf_iorequest(bp);
> + return 0;
> }
>
> /*
> Index: linux-2.6-xfs/fs/xfs/xfs_buf_item.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/xfs_buf_item.c 2008-11-15 15:24:38.000000000 +0100
> +++ linux-2.6-xfs/fs/xfs/xfs_buf_item.c 2008-11-15 15:25:05.000000000 +0100
> @@ -707,8 +707,8 @@ xfs_buf_item_init(
> * the first. If we do already have one, there is
> * nothing to do here so return.
> */
> - if (XFS_BUF_FSPRIVATE3(bp, xfs_mount_t *) != mp)
> - XFS_BUF_SET_FSPRIVATE3(bp, mp);
> + if (bp->b_mount != mp)
> + bp->b_mount = mp;
> XFS_BUF_SET_BDSTRAT_FUNC(bp, xfs_bdstrat_cb);
> if (XFS_BUF_FSPRIVATE(bp, void *) != NULL) {
> lip = XFS_BUF_FSPRIVATE(bp, xfs_log_item_t *);
> Index: linux-2.6-xfs/fs/xfs/xfs_rw.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/xfs_rw.c 2008-11-15 15:26:37.000000000 +0100
> +++ linux-2.6-xfs/fs/xfs/xfs_rw.c 2008-11-15 15:27:17.000000000 +0100
> @@ -406,7 +406,7 @@ xfs_bwrite(
> * XXXsup how does this work for quotas.
> */
> XFS_BUF_SET_BDSTRAT_FUNC(bp, xfs_bdstrat_cb);
> - XFS_BUF_SET_FSPRIVATE3(bp, mp);
> + bp->b_mount = mp;
> XFS_BUF_WRITE(bp);
>
> if ((error = XFS_bwrite(bp))) {
> Index: linux-2.6-xfs/fs/xfs/xfs_log_recover.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/xfs_log_recover.c 2008-11-15 15:31:41.000000000 +0100
> +++ linux-2.6-xfs/fs/xfs/xfs_log_recover.c 2008-11-15 15:35:12.000000000 +0100
> @@ -267,21 +267,16 @@ STATIC void
> xlog_recover_iodone(
> struct xfs_buf *bp)
> {
> - xfs_mount_t *mp;
> -
> - ASSERT(XFS_BUF_FSPRIVATE(bp, void *));
> -
> if (XFS_BUF_GETERROR(bp)) {
> /*
> * We're not going to bother about retrying
> * this during recovery. One strike!
> */
> - mp = XFS_BUF_FSPRIVATE(bp, xfs_mount_t *);
> xfs_ioerror_alert("xlog_recover_iodone",
> - mp, bp, XFS_BUF_ADDR(bp));
> - xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR);
> + bp->b_mount, bp, XFS_BUF_ADDR(bp));
> + xfs_force_shutdown(bp->b_mount, SHUTDOWN_META_IO_ERROR);
> }
> - XFS_BUF_SET_FSPRIVATE(bp, NULL);
> + bp->b_mount = NULL;
> XFS_BUF_CLR_IODONE_FUNC(bp);
> xfs_biodone(bp);
> }
> @@ -2225,9 +2220,8 @@ xlog_recover_do_buffer_trans(
> XFS_BUF_STALE(bp);
> error = xfs_bwrite(mp, bp);
> } else {
> - ASSERT(XFS_BUF_FSPRIVATE(bp, void *) == NULL ||
> - XFS_BUF_FSPRIVATE(bp, xfs_mount_t *) == mp);
> - XFS_BUF_SET_FSPRIVATE(bp, mp);
> + ASSERT(bp->b_mount == NULL || bp->b_mount == mp);
> + bp->b_mount = mp;
> XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone);
> xfs_bdwrite(mp, bp);
> }
> @@ -2490,9 +2484,8 @@ xlog_recover_do_inode_trans(
>
> write_inode_buffer:
> if (ITEM_TYPE(item) == XFS_LI_INODE) {
> - ASSERT(XFS_BUF_FSPRIVATE(bp, void *) == NULL ||
> - XFS_BUF_FSPRIVATE(bp, xfs_mount_t *) == mp);
> - XFS_BUF_SET_FSPRIVATE(bp, mp);
> + ASSERT(bp->b_mount == NULL || bp->b_mount == mp);
> + bp->b_mount = mp;
> XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone);
> xfs_bdwrite(mp, bp);
> } else {
> @@ -2623,9 +2616,8 @@ xlog_recover_do_dquot_trans(
> memcpy(ddq, recddq, item->ri_buf[1].i_len);
>
> ASSERT(dq_f->qlf_size == 2);
> - ASSERT(XFS_BUF_FSPRIVATE(bp, void *) == NULL ||
> - XFS_BUF_FSPRIVATE(bp, xfs_mount_t *) == mp);
> - XFS_BUF_SET_FSPRIVATE(bp, mp);
> + ASSERT(bp->b_mount == NULL || bp->b_mount == mp);
> + bp->b_mount = mp;
> XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone);
> xfs_bdwrite(mp, bp);
>
>
> --
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
---end quoted text---
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 00/22] 2.6.29 queue
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
` (21 preceding siblings ...)
2008-12-02 16:04 ` [patch 22/22] use inode_change_ok for setattr permission checking Christoph Hellwig
@ 2008-12-03 17:13 ` Christoph Hellwig
22 siblings, 0 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-03 17:13 UTC (permalink / raw)
To: xfs
On Tue, Dec 02, 2008 at 11:04:30AM -0500, Christoph Hellwig wrote:
> This is my current 2.6.29 queue. All but a few trivial patches have already
> been posted to the list. I have another two patches for 2.6.29 in progress
> that aren't included but should go to the list in a few days.
>
> Note that this is a series against the master tree, patches against dmapi or
> xfsidbg aren't included (and not relevant for 2.6.29).
The 20 patches that have been reviewed are now available in a git
repository:
http://git.kernel.org/?p=linux/kernel/git/hch/xfs.git
git://git.kernel.org/pub/scm/linux/kernel/git/hch/xfs.git
This includes all the small fixups suggested by Dave, and all the
reviewed-by tags.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c
2008-12-03 10:58 ` Christoph Hellwig
@ 2008-12-03 21:48 ` Dave Chinner
0 siblings, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 21:48 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Wed, Dec 03, 2008 at 05:58:31AM -0500, Christoph Hellwig wrote:
> On Wed, Dec 03, 2008 at 02:17:19PM +1100, Dave Chinner wrote:
> > On Tue, Dec 02, 2008 at 11:04:50AM -0500, Christoph Hellwig wrote:
> > > The whole machinery to wait on I/O completion is related to the I/O path
> > > and should be there instead of in xfs_vnode.c. Also give the functions
> > > more descriptive names.
> >
> > I'm not sure that "xfs_ioend_..." is the best name - it looks
> > slightly weird in some of the callers' contexts. Just dropping the
> > "end" out of the names makes the code read much better (i.e.
> > xfs_io_wait() and xfs_io_wake()). Not particularly important,
> > though, and everything else looks good.
>
> xfs_ioend_* wasn't my first choice either. I first did
> xfs_iowait/xfs_iowake, but that clashes with the buffercache.
Ah, so it does. but:
#define xfs_iowait(bp) xfs_buf_iowait(bp)
Perhaps we should kill that define and just use xfs_buf_iowait(bp)
because it documents that we really are waiting on a specific
object....
Then maybe we can use xfs_data_iowake/xfs_data_iowait for the data
I/O on an inode to complete. That way it's obvious from the code
exactly what we are waiting on, too (which might make some of the
comments redundant).
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 15/22] replace b_fspriv with b_mount
2008-12-02 16:04 ` [patch 15/22] replace b_fspriv with b_mount Christoph Hellwig
2008-12-03 14:03 ` Christoph Hellwig
@ 2008-12-03 21:54 ` Dave Chinner
1 sibling, 0 replies; 61+ messages in thread
From: Dave Chinner @ 2008-12-03 21:54 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Dec 02, 2008 at 11:04:45AM -0500, Christoph Hellwig wrote:
> Replace the b_fspriv pointer and it's ugly accessors with a properly types
> xfs_mount pointer. Also switch log reocvery over to it instead of using
> b_fspriv for the mount pointer.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Sorry Christoph, I missed this one. Looks good, though.
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 01/22] fix compile on 32 bit systems
2008-12-02 16:04 ` [patch 01/22] fix compile on 32 bit systems Christoph Hellwig
2008-12-02 16:43 ` Eric Sandeen
2008-12-03 2:20 ` Eric Sandeen
@ 2008-12-04 1:03 ` Niv Sardi
2008-12-04 12:34 ` Christoph Hellwig
2 siblings, 1 reply; 61+ messages in thread
From: Niv Sardi @ 2008-12-04 1:03 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig <hch@infradead.org> writes:
[…]
> +xfs_file_compat_ioctl_invis(
^^^^^^^^^^^
[…]
> -extern long xfs_file_compat_invis_ioctl(struct file *, unsigned, unsigned long);
^^^^^^^^^^^
Fixed it up, it's in QA now,
Cheers,
--
Niv Sardi
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 12/22] kill dead inode flags
2008-12-02 16:04 ` [patch 12/22] kill dead inode flags Christoph Hellwig
2008-12-03 2:59 ` Dave Chinner
@ 2008-12-04 2:24 ` Niv Sardi
2008-12-04 12:35 ` Christoph Hellwig
1 sibling, 1 reply; 61+ messages in thread
From: Niv Sardi @ 2008-12-04 2:24 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig <hch@infradead.org> writes:
> There are a few inode flags around that aren't used anywhere, so remove
> them. Also update xfsidbg to display all used inode flags correctly.
Thanks for splitting things up, you have your idbg patch somewhere
though ? should the reference to it be removed from the commit ?
Cheers,
--
Niv Sardi
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 01/22] fix compile on 32 bit systems
2008-12-04 1:03 ` Niv Sardi
@ 2008-12-04 12:34 ` Christoph Hellwig
2008-12-04 13:03 ` Niv Sardi
0 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-04 12:34 UTC (permalink / raw)
To: Niv Sardi; +Cc: Christoph Hellwig, xfs
On Thu, Dec 04, 2008 at 12:03:22PM +1100, Niv Sardi wrote:
> Christoph Hellwig <hch@infradead.org> writes:
> [???]
> > +xfs_file_compat_ioctl_invis(
> ^^^^^^^^^^^
> [???]
> > -extern long xfs_file_compat_invis_ioctl(struct file *, unsigned, unsigned long);
> ^^^^^^^^^^^
>
> Fixed it up, it's in QA now,
Doh, thanks.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 12/22] kill dead inode flags
2008-12-04 2:24 ` Niv Sardi
@ 2008-12-04 12:35 ` Christoph Hellwig
0 siblings, 0 replies; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-04 12:35 UTC (permalink / raw)
To: Niv Sardi; +Cc: Christoph Hellwig, xfs
On Thu, Dec 04, 2008 at 01:24:04PM +1100, Niv Sardi wrote:
> Christoph Hellwig <hch@infradead.org> writes:
>
> > There are a few inode flags around that aren't used anywhere, so remove
> > them. Also update xfsidbg to display all used inode flags correctly.
>
> Thanks for splitting things up, you have your idbg patch somewhere
> though ? should the reference to it be removed from the commit ?
No, sorry. When I ported things to the new tree I lost those changes.
Given that I do all work on the master branch don't expect fixes for
these bits unless it's specificly for the -dev branch (e.g. dmapi).
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 01/22] fix compile on 32 bit systems
2008-12-04 12:34 ` Christoph Hellwig
@ 2008-12-04 13:03 ` Niv Sardi
2008-12-04 13:11 ` Christoph Hellwig
0 siblings, 1 reply; 61+ messages in thread
From: Niv Sardi @ 2008-12-04 13:03 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Oh well, lachland allready checked it in like that...
On Thu, Dec 4, 2008 at 11:34 PM, Christoph Hellwig <hch@infradead.org> wrote:
> On Thu, Dec 04, 2008 at 12:03:22PM +1100, Niv Sardi wrote:
>> Christoph Hellwig <hch@infradead.org> writes:
>> [???]
>> > +xfs_file_compat_ioctl_invis(
>> ^^^^^^^^^^^
>> [???]
>> > -extern long xfs_file_compat_invis_ioctl(struct file *, unsigned, unsigned long);
>> ^^^^^^^^^^^
>>
>> Fixed it up, it's in QA now,
>
> Doh, thanks.
>
>
--
Niv Sardi
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 01/22] fix compile on 32 bit systems
2008-12-04 13:03 ` Niv Sardi
@ 2008-12-04 13:11 ` Christoph Hellwig
2008-12-04 13:40 ` Niv Sardi
0 siblings, 1 reply; 61+ messages in thread
From: Christoph Hellwig @ 2008-12-04 13:11 UTC (permalink / raw)
To: Niv Sardi; +Cc: Christoph Hellwig, xfs
On Fri, Dec 05, 2008 at 12:03:15AM +1100, Niv Sardi wrote:
> Oh well, lachland allready checked it in like that...
Just put in my add FMODE_NOCMTIME patch in, it removes all that invis
file operations crap :) Seriously, it's already been reviewed on
-fsdevel anyway.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
* Re: [patch 01/22] fix compile on 32 bit systems
2008-12-04 13:11 ` Christoph Hellwig
@ 2008-12-04 13:40 ` Niv Sardi
0 siblings, 0 replies; 61+ messages in thread
From: Niv Sardi @ 2008-12-04 13:40 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Bissectable commits my dear christoph, bissectable commits =)
Mark told me I should make you happy and put lots of patches of yours
in if you put them in nice git trees for us =) just send to list.
On Fri, Dec 5, 2008 at 12:11 AM, Christoph Hellwig <hch@infradead.org> wrote:
> On Fri, Dec 05, 2008 at 12:03:15AM +1100, Niv Sardi wrote:
>> Oh well, lachland allready checked it in like that...
>
> Just put in my add FMODE_NOCMTIME patch in, it removes all that invis
> file operations crap :) Seriously, it's already been reviewed on
> -fsdevel anyway.
>
>
--
Niv Sardi
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 61+ messages in thread
end of thread, other threads:[~2008-12-04 13:47 UTC | newest]
Thread overview: 61+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-02 16:04 [patch 00/22] 2.6.29 queue Christoph Hellwig
2008-12-02 16:04 ` [patch 01/22] fix compile on 32 bit systems Christoph Hellwig
2008-12-02 16:43 ` Eric Sandeen
2008-12-03 2:20 ` Eric Sandeen
2008-12-04 1:03 ` Niv Sardi
2008-12-04 12:34 ` Christoph Hellwig
2008-12-04 13:03 ` Niv Sardi
2008-12-04 13:11 ` Christoph Hellwig
2008-12-04 13:40 ` Niv Sardi
2008-12-02 16:04 ` [patch 02/22] remove useless mnt_want_write call in xfs_write Christoph Hellwig
2008-12-03 2:11 ` Dave Chinner
2008-12-02 16:04 ` [patch 03/22] remove unused behvavior cruft in xfs_super.h Christoph Hellwig
2008-12-03 2:12 ` Dave Chinner
2008-12-02 16:04 ` [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free Christoph Hellwig
2008-12-03 2:13 ` Dave Chinner
2008-12-03 2:22 ` Eric Sandeen
2008-12-02 16:04 ` [patch 05/22] cleanup the inode reclaim path Christoph Hellwig
2008-12-03 2:29 ` Dave Chinner
2008-12-03 10:53 ` Christoph Hellwig
2008-12-02 16:04 ` [patch 06/22] kill xfs_buf_iostart Christoph Hellwig
2008-12-03 2:37 ` Dave Chinner
2008-12-02 16:04 ` [patch 07/22] stop using igrab in xfs_vn_link Christoph Hellwig
2008-12-03 2:39 ` Dave Chinner
2008-12-02 16:04 ` [patch 08/22] reduce l_icloglock roundtrips Christoph Hellwig
2008-12-03 2:56 ` Dave Chinner
2008-12-03 10:51 ` Christoph Hellwig
2008-12-02 16:04 ` [patch 09/22] remove dead code from sv_t implementation Christoph Hellwig
2008-12-03 2:56 ` Dave Chinner
2008-12-02 16:04 ` [patch 10/22] kill dead quota flags Christoph Hellwig
2008-12-03 2:57 ` Dave Chinner
2008-12-02 16:04 ` [patch 11/22] cleanup xfs_sb.h feature flag helpers Christoph Hellwig
2008-12-03 6:26 ` Donald Douwsma
2008-12-03 10:52 ` Christoph Hellwig
2008-12-02 16:04 ` [patch 12/22] kill dead inode flags Christoph Hellwig
2008-12-03 2:59 ` Dave Chinner
2008-12-04 2:24 ` Niv Sardi
2008-12-04 12:35 ` Christoph Hellwig
2008-12-02 16:04 ` [patch 13/22] remove unused m_inode_quiesce member from struct xfs_mount Christoph Hellwig
2008-12-03 2:59 ` Dave Chinner
2008-12-02 16:04 ` [patch 14/22] remove leftovers of shared read-only support Christoph Hellwig
2008-12-03 3:01 ` Dave Chinner
2008-12-03 10:57 ` Christoph Hellwig
2008-12-02 16:04 ` [patch 15/22] replace b_fspriv with b_mount Christoph Hellwig
2008-12-03 14:03 ` Christoph Hellwig
2008-12-03 21:54 ` Dave Chinner
2008-12-02 16:04 ` [patch 16/22] use xfs_trans_ijoin in xfs_trans_iget Christoph Hellwig
2008-12-03 3:03 ` Dave Chinner
2008-12-02 16:04 ` [patch 17/22] no explicit xfs_iflush for special inodes during unmount Christoph Hellwig
2008-12-03 3:06 ` Dave Chinner
2008-12-02 16:04 ` [patch 18/22] kill xfs_unmount_flush Christoph Hellwig
2008-12-03 3:08 ` Dave Chinner
2008-12-02 16:04 ` [patch 19/22] kill vn_ioerror Christoph Hellwig
2008-12-03 3:13 ` Dave Chinner
2008-12-02 16:04 ` [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c Christoph Hellwig
2008-12-03 3:17 ` Dave Chinner
2008-12-03 10:58 ` Christoph Hellwig
2008-12-03 21:48 ` Dave Chinner
2008-12-02 16:04 ` [patch 21/22] move inode tracing out of xfs_vnode Christoph Hellwig
2008-12-03 3:18 ` Dave Chinner
2008-12-02 16:04 ` [patch 22/22] use inode_change_ok for setattr permission checking Christoph Hellwig
2008-12-03 17:13 ` [patch 00/22] 2.6.29 queue Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox