#define NVOLS 64 /* hash table size for volume table */
#define NFENTRIES 256 /* hash table size for disk volume table */
#define VCSIZE 1024 /* stat cache hash table size */
-#define DCSIZE 512 /* disk cache hash table size */
#define CBRSIZE 512 /* call back returns hash table size */
#define PIGGYSIZE 1350 /* max piggyback size */
#define MAXVOLS 128 /* max vols we can store */
#define CBulkStat 0x00020000 /* loaded by a bulk stat, and not ref'd since */
#define CUnlinkedDel 0x00040000
#define CVFlushed 0x00080000
-#ifdef AFS_LINUX22_ENV
-#define CPageWrite 0x00200000 /* to detect vm deadlock - linux */
-#elif defined(AFS_SGI_ENV)
+#if defined(AFS_SGI_ENV)
#define CWritingUFS 0x00200000 /* to detect vm deadlock - used by sgi */
#elif defined(AFS_DARWIN80_ENV)
#define CEvent 0x00200000 /* to preclude deadlock when sending events */
struct afs_vnuniq oldParent;
};
+/* Values for 'mvstat' in struct vcache */
+#define AFS_MVSTAT_FILE (0x0) /* regular file or directory */
+#define AFS_MVSTAT_MTPT (0x1) /* mountpoint */
+#define AFS_MVSTAT_ROOT (0x2) /* volume root dir */
+
#ifdef AFS_SUN5_ENV
/*
* This is for the multiPage field in struct vcache. Each one of these
#endif
#endif
- struct VenusFid *mvid; /* Either parent dir (if root) or root (if mt pt) */
+ union {
+ char *silly_name; /* For sillyrenamed regular files, the silly
+ * name the file was renamed to. */
+ struct VenusFid *target_root; /* For mountpoints, the fid of the root dir
+ * in the target volume. */
+ struct VenusFid *parent; /* For root dir vcaches, the fid of the
+ * parent dir. */
+ } mvid;
+
char *linkData; /* Link data if a symlink. */
afs_hyper_t flushDV; /* data version last flushed from text */
afs_hyper_t mapDV; /* data version last flushed from map */
short execsOrWriters; /* The number of execs (if < 0) or writers (if > 0) of
* this file. */
short flockCount; /* count of flock readers, or -1 if writer */
- char mvstat; /* 0->normal, 1->mt pt, 2->root. */
+ char mvstat; /* see the AFS_MVSTAT_* constants */
char cachingStates; /* Caching policies for this file */
afs_uint32 cachingTransitions; /* # of times file has flopped between caching and not */
void *vpacRock; /* used to read or write in visible partitions */
#endif
afs_uint32 lastBRLWarnTime; /* last time we warned about byte-range locks */
+#ifdef AFS_LINUX26_ENV
+ spinlock_t pagewriter_lock;
+ struct list_head pagewriters; /* threads that are writing vm pages */
+#endif
+};
+
+#ifdef AFS_LINUX26_ENV
+struct pagewriter {
+ struct list_head link;
+ pid_t writer;
};
+#endif
#define DONT_CHECK_MODE_BITS 0
#define CHECK_MODE_BITS 1