[SSI] openssi/kernel/include/cluster/ssi/cfs cfs_clnt.h, 1.13, 1.14 cfs_fs.h, 1.17, 1.18 cfs_fs_i.h, 1.16, 1.17 cfs_fs_sb.h, 1.9, 1.10 cfs_mount.h, 1.7, 1.8 cfs_page.h, 1.8, 1.9 cfsfh.h, 1.8, 1.9 cfstok.h, 1.14, 1.15
Roger Tsang <[email protected]>
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/cfs
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29491/include/cluster/ssi/cfs
Modified Files:
Tag: OPENSSI-FC
cfs_clnt.h cfs_fs.h cfs_fs_i.h cfs_fs_sb.h cfs_mount.h
cfs_page.h cfsfh.h cfstok.h
Log Message:
Bug fixes and enhancements (see ChangeLog)
Index: cfsfh.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/cfs/cfsfh.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cfsfh.h 20 Apr 2008 05:49:25 -0000 1.8
+++ cfsfh.h 24 Mar 2009 04:26:29 -0000 1.9
@@ -162,4 +162,9 @@
}
#endif
+#ifdef CFS_EXPORT_OPS
+/* ssidev,size,type,ino + size of PFS file handle */
+#define CFS_FH_LEN(__fhp) (sizeof(__u32) * (4 + ((__u32 *)(__fhp))[1]))
+#endif
+
#endif /* _LINUX_CFSD_FH_H */
Index: cfs_fs.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/cfs/cfs_fs.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- cfs_fs.h 10 Oct 2008 08:10:33 -0000 1.17
+++ cfs_fs.h 24 Mar 2009 04:26:29 -0000 1.18
@@ -25,6 +25,7 @@
#include <cluster/ssi/cfs/cfs_xdr.h>
#endif
+#ifdef SSI_NOTUSED
/*
* CFS_MAX_DIRCACHE controls the number of simultaneously cached
* directory chunks. Each chunk holds the list of cfs_entry's returned
@@ -33,9 +34,24 @@
* Note that at most server->rsize bytes of the cache memory are used.
*/
#define CFS_MAX_DIRCACHE 16
+#endif
+#ifdef KERNEL2616_53
+/*
+ * To change the maximum rsize and wsize supported by the CFS client, adjust
+ * CFS_MAX_FILE_IO_SIZE. 64KB is a typical maximum, but some servers can
+ * support a megabyte or more. The default is left at 4096 bytes, which is
+ * reasonable for CFS over UDP.
+ */
+/* SSI_XXX: ICS_MAX_OOL_DATA_SIZE 0x10000 */
+#define CFS_MAX_FILE_IO_SIZE (0x10000)
+//#define CFS_MAX_FILE_IO_SIZE (1048576U)
+#define CFS_DEF_FILE_IO_SIZE (4096U)
+#define CFS_MIN_FILE_IO_SIZE (1024U)
+#else
#define CFS_MAX_FILE_IO_BUFFER_SIZE 32768
#define CFS_DEF_FILE_IO_BUFFER_SIZE 4096
+#endif /* !KERNEL2616_53 */
#ifdef SSI_SKIP /* not used */
/*
@@ -153,6 +169,13 @@
/*
* linux/fs/cfs/inode.c
*/
+
+struct cfs_find_desc {
+ struct cfsdirok *cdrok;
+ svrcfstok_t *hp;
+};
+extern int cfs_find_actor(struct inode *, void *);
+
extern void cfs_zap_caches(struct inode *);
extern struct inode *cfs_fhget(struct super_block *, struct cfsdirok *);
extern struct inode *__cfs_fhget(struct super_block *, struct cfsdirok *,
@@ -218,7 +241,9 @@
/*
* linux/fs/cfs/locks.c
*/
+#ifdef SSI_NOTUSED
extern int cfs_lock(struct file *, int, struct file_lock *);
+#endif
/*
* linux/fs/cfs/write.c
@@ -320,6 +345,7 @@
extern int cfs_get_cnode_idx(void);
extern void cfs_free_cnode_idx(int);
#ifdef CFS_FH_TO_DENTRY_ANON
+extern struct dentry *__cfs_get_dentry(struct super_block *, cfhandle_t *);
extern struct svrcfstok *cfs_fhtohp(cfhandle_t *);
#endif
@@ -391,6 +417,18 @@
__retval; \
})
+#ifdef CFS_INTR
+static inline void cfs_clnt_sigmask(cfs_mntinfo_t *mip, sigset_t *oldset)
+{
+ ssi_mask_signals(current, oldset, mip->mi_flags & MI_INTR);
+}
+
+static inline void cfs_clnt_sigunmask(cfs_mntinfo_t *mip, sigset_t *oldset)
+{
+ ssi_unmask_signals(current, oldset, mip->mi_flags & MI_INTR);
+}
+#endif /* CFS_INTR */
+
#endif /* __KERNEL__ */
/*
Index: cfs_clnt.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/cfs/cfs_clnt.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cfs_clnt.h 3 Feb 2009 06:18:13 -0000 1.13
+++ cfs_clnt.h 24 Mar 2009 04:26:29 -0000 1.14
@@ -169,6 +169,7 @@
#define CFS_SB_HARD_MIP(_mip) \
(((_mip)->mi_flags & (MI_CHARD)) != 0)
+#ifndef KERNEL2616_53
/* Tune for performance */
#define CFS_MAX_IOVEC UIO_FASTIOV
@@ -181,6 +182,7 @@
#if (CFS_READ_MAXIOV > CFS_MAX_IOVEC)
#error "CFS_READ_MAXIOV is too large"
#endif
+#endif /* !KERNEL2616_53 */
#ifdef CFS_READAHEAD
#define CFS_MAX_READAHEAD (16U)
Index: cfstok.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/cfs/cfstok.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- cfstok.h 22 Feb 2009 04:15:38 -0000 1.14
+++ cfstok.h 24 Mar 2009 04:26:29 -0000 1.15
@@ -403,8 +403,8 @@
#ifdef SVRCFSTOK_SCT_FLAGS_NOLOCK
/* Bits in sct_flags */
-#define CFS_NOTOKENCACHE 0
-#define CFS_DELAYUNLNK 1 /* file has been renamed */
+#define CFS_NOTOKENCACHE 1
+#define CFS_DELAYUNLNK 2 /* file has been renamed */
#else
/* Bit values for sct_flags */
#define CFS_NOTOKENCACHE 0x1
@@ -431,6 +431,10 @@
#define CFS_PURGETYPE 0x8
#endif
+void svrtok_relse(struct svrcfstok *hp);
+
+#define HASH_RELE(hp) svrtok_relse(hp)
+
#ifdef RCU_CFSTOK_TABLE
#define HASH_HOLD(_hp) atomic_inc(&(_hp)->sct_refcnt)
/*
@@ -439,14 +443,16 @@
*/
#define SET_CFSTOK_MASK(_hp, _type) do { \
if (!((_hp)->sct_tokmask & BITVAL(_type))) \
- atomic_inc(&(_hp)->sct_refcnt); \
+ HASH_HOLD(_hp); \
(_hp)->sct_tokmask |= BITVAL(_type); \
} while (0)
+
#define UNSET_CFSTOK_MASK(_hp, _type) do { \
if ((_hp)->sct_tokmask & BITVAL(_type)) \
- atomic_dec(&(_hp)->sct_refcnt); \
+ HASH_RELE(_hp); \
(_hp)->sct_tokmask &= ~(BITVAL(_type)); \
} while (0)
+
#else
/* SSI_XXX: Hold and release hash structure */
#define HASH_HOLD(hp) {\
@@ -456,10 +462,6 @@
}
#endif /* !RCU_CFSTOK_TABLE */
-void svrtok_relse(struct svrcfstok *hp);
-
-#define HASH_RELE(hp) svrtok_relse(hp)
-
struct svrcfstok *makehp(struct super_block *mount_sb, dev_t, struct dentry *);
/* Non-zero if the svrcfstok is in a "Timeout PFS" (like NFS). */
Index: cfs_page.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/cfs/cfs_page.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cfs_page.h 10 Oct 2008 08:10:33 -0000 1.8
+++ cfs_page.h 24 Mar 2009 04:26:29 -0000 1.9
@@ -14,8 +14,8 @@
#include <linux/pagemap.h>
#include <linux/wait.h>
#include <cluster/ssi/cfs/cfs_fs_sb.h>
-#include <linux/sunrpc/auth.h>
#ifdef SKIP
+#include <linux/sunrpc/auth.h>
#include <cluster/ssi/cfs/cfs_xdr.h>
#endif
#ifdef KERNEL2616_53
Index: cfs_fs_i.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/cfs/cfs_fs_i.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- cfs_fs_i.h 3 Feb 2009 06:18:13 -0000 1.16
+++ cfs_fs_i.h 24 Mar 2009 04:26:29 -0000 1.17
@@ -333,6 +333,6 @@
UNLOCK_COND_LOCK(&(cp)->c_statelock);\
NSC_SWAPUNLOCK(); \
} while (0)
-#endif /* CONFIG_CFS */
+#endif /* CFS_UPDATE_ATTR_LOCKED */
#endif /* !_SSI_CFS_CNODE_H */
Index: cfs_mount.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/cfs/cfs_mount.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cfs_mount.h 23 Apr 2005 04:50:24 -0000 1.7
+++ cfs_mount.h 24 Mar 2009 04:26:29 -0000 1.8
@@ -74,6 +74,9 @@
int cfs_stackable(char *);
int cfs_domount(struct super_block **sbp, struct nameidata *nd);
int cfs_layered_mount(struct super_block *, struct super_block *, int);
+#ifdef RCU_CFSTOK_TABLE
+struct svrcfstok *hfind(struct cfs_fh *);
+#endif
struct svrcfstok *svrtok_lookup(struct cfs_fh *, struct dentry *,
struct super_block *);
extern int cfs_mount_root(char *, clusternode_t);
Index: cfs_fs_sb.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/cfs/cfs_fs_sb.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cfs_fs_sb.h 3 Feb 2009 06:18:13 -0000 1.9
+++ cfs_fs_sb.h 24 Mar 2009 04:26:29 -0000 1.10
@@ -70,9 +70,12 @@
#ifdef SSI_CFS_FROMNFS
struct rpc_clnt * client; /* RPC client handle */
+ int flags; /* various flags */
#endif
struct cfs_rpc_ops * rpc_ops; /* CFS protocol vector */
- int flags; /* various flags */
+#ifdef CFS_BDI
+ struct backing_dev_info backing_dev_info;
+#endif
unsigned int rsize; /* read size */
unsigned int rpages; /* read size (in pages) */
unsigned int wsize; /* write size */
@@ -91,7 +94,7 @@
#endif
struct list_head dirty_down,
read_down;
-#ifdef SSI_XXX_NOTUSED
+#ifdef SSI_NOTUSED
struct list_head lru_read,
lru_dirty,
lru_commit,
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com