summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h5
-rw-r--r--include/linux/iobuf.h12
-rw-r--r--include/linux/netfilter.h2
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack.h18
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_core.h13
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_icmp.h11
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_protocol.h6
-rw-r--r--include/linux/raw.h7
-rw-r--r--include/linux/reiserfs_fs.h3
-rw-r--r--include/linux/reiserfs_fs_i.h5
-rw-r--r--include/linux/reiserfs_fs_sb.h1
-rw-r--r--include/linux/usb.h1
12 files changed, 58 insertions, 26 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 39dc8ac3aa36..b1fa3cc77bff 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -655,9 +655,11 @@ struct super_block {
unsigned long s_flags;
unsigned long s_magic;
struct dentry *s_root;
+ struct rw_semaphore s_umount;
wait_queue_head_t s_wait;
struct list_head s_dirty; /* dirty inodes */
+ struct list_head s_locked_inodes;/* inodes being synced */
struct list_head s_files;
struct block_device *s_bdev;
@@ -1090,9 +1092,12 @@ extern void invalidate_inode_buffers(struct inode *);
#define destroy_buffers(dev) __invalidate_buffers((dev), 1)
extern void __invalidate_buffers(kdev_t dev, int);
extern void sync_inodes(kdev_t);
+extern void sync_unlocked_inodes(void);
extern void write_inode_now(struct inode *, int);
extern void sync_dev(kdev_t);
extern int fsync_dev(kdev_t);
+extern int fsync_super(struct super_block *);
+extern void sync_inodes_sb(struct super_block *);
extern int fsync_inode_buffers(struct inode *);
extern int osync_inode_buffers(struct inode *);
extern int inode_has_buffers(struct inode *);
diff --git a/include/linux/iobuf.h b/include/linux/iobuf.h
index 3de43c924039..619187efec8d 100644
--- a/include/linux/iobuf.h
+++ b/include/linux/iobuf.h
@@ -24,8 +24,7 @@
* entire iovec.
*/
-#define KIO_MAX_ATOMIC_IO 64 /* in kb */
-#define KIO_MAX_ATOMIC_BYTES (64 * 1024)
+#define KIO_MAX_ATOMIC_IO 512 /* in kb */
#define KIO_STATIC_PAGES (KIO_MAX_ATOMIC_IO / (PAGE_SIZE >> 10) + 1)
#define KIO_MAX_SECTORS (KIO_MAX_ATOMIC_IO * 2)
@@ -47,8 +46,10 @@ struct kiobuf
unsigned int locked : 1; /* If set, pages has been locked */
- /* Always embed enough struct pages for 64k of IO */
+ /* Always embed enough struct pages for atomic IO */
struct page * map_array[KIO_STATIC_PAGES];
+ struct buffer_head * bh[KIO_MAX_SECTORS];
+ unsigned long blocks[KIO_MAX_SECTORS];
/* Dynamic state for IO completion: */
atomic_t io_count; /* IOs still in progress */
@@ -64,17 +65,18 @@ int map_user_kiobuf(int rw, struct kiobuf *, unsigned long va, size_t len);
void unmap_kiobuf(struct kiobuf *iobuf);
int lock_kiovec(int nr, struct kiobuf *iovec[], int wait);
int unlock_kiovec(int nr, struct kiobuf *iovec[]);
+void mark_dirty_kiobuf(struct kiobuf *iobuf, int bytes);
/* fs/iobuf.c */
-void __init kiobuf_setup(void);
-void kiobuf_init(struct kiobuf *);
void end_kio_request(struct kiobuf *, int);
void simple_wakeup_kiobuf(struct kiobuf *);
int alloc_kiovec(int nr, struct kiobuf **);
void free_kiovec(int nr, struct kiobuf **);
int expand_kiobuf(struct kiobuf *, int);
void kiobuf_wait_for_io(struct kiobuf *);
+extern int alloc_kiobuf_bhs(struct kiobuf *);
+extern void free_kiobuf_bhs(struct kiobuf *);
/* fs/buffer.c */
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index c18810e526c4..46c2b72e33f3 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -145,6 +145,8 @@ extern void nf_reinject(struct sk_buff *skb,
struct nf_info *info,
unsigned int verdict);
+extern void (*ip_ct_attach)(struct sk_buff *, struct nf_ct_info *);
+
#ifdef CONFIG_NETFILTER_DEBUG
extern void nf_dump_skb(int pf, struct sk_buff *skb);
#endif
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h
index 35caff35f1f5..9d8a18a06048 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -32,6 +32,7 @@ enum ip_conntrack_info
#include <linux/types.h>
#include <linux/skbuff.h>
#include <linux/netfilter_ipv4/ip_conntrack_tcp.h>
+#include <linux/netfilter_ipv4/ip_conntrack_icmp.h>
#ifdef CONFIG_NF_DEBUG
#define IP_NF_ASSERT(x) \
@@ -56,12 +57,8 @@ enum ip_conntrack_status {
IPS_SEEN_REPLY_BIT = 1,
IPS_SEEN_REPLY = (1 << IPS_SEEN_REPLY_BIT),
- /* Packet seen leaving box: bit 2 set. Can be set, not unset. */
- IPS_CONFIRMED_BIT = 2,
- IPS_CONFIRMED = (1 << IPS_CONFIRMED_BIT),
-
/* Conntrack should never be early-expired. */
- IPS_ASSURED_BIT = 4,
+ IPS_ASSURED_BIT = 2,
IPS_ASSURED = (1 << IPS_ASSURED_BIT),
};
@@ -88,7 +85,7 @@ struct ip_conntrack_expect
struct ip_conntrack
{
- /* Usage count in here is 1 for destruct timer, 1 per skb,
+ /* Usage count in here is 1 for hash table/destruct timer, 1 per skb,
plus 1 for any connection(s) we are `master' for */
struct nf_conntrack ct_general;
@@ -119,6 +116,7 @@ struct ip_conntrack
union {
struct ip_ct_tcp tcp;
+ struct ip_ct_icmp icmp;
} proto;
union {
@@ -177,5 +175,13 @@ ip_ct_gather_frags(struct sk_buff *skb);
extern void
ip_ct_selective_cleanup(int (*kill)(const struct ip_conntrack *i, void *data),
void *data);
+
+/* It's confirmed if it is, or has been in the hash table. */
+static inline int is_confirmed(struct ip_conntrack *ct)
+{
+ return ct->tuplehash[IP_CT_DIR_ORIGINAL].list.next != NULL;
+}
+
+extern unsigned int ip_conntrack_htable_size;
#endif /* __KERNEL__ */
#endif /* _IP_CONNTRACK_H */
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_core.h b/include/linux/netfilter_ipv4/ip_conntrack_core.h
index bcf300c51d45..6ed40793af6a 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack_core.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack_core.h
@@ -33,10 +33,17 @@ struct ip_conntrack_tuple_hash *
ip_conntrack_find_get(const struct ip_conntrack_tuple *tuple,
const struct ip_conntrack *ignored_conntrack);
-/* Confirm a connection */
-void ip_conntrack_confirm(struct ip_conntrack *ct);
+extern int __ip_conntrack_confirm(struct nf_ct_info *nfct);
+
+/* Confirm a connection: returns NF_DROP if packet must be dropped. */
+static inline int ip_conntrack_confirm(struct sk_buff *skb)
+{
+ if (skb->nfct
+ && !is_confirmed((struct ip_conntrack *)skb->nfct->master))
+ return __ip_conntrack_confirm(skb->nfct);
+ return NF_ACCEPT;
+}
-extern unsigned int ip_conntrack_htable_size;
extern struct list_head *ip_conntrack_hash;
extern struct list_head expect_list;
DECLARE_RWLOCK_EXTERN(ip_conntrack_lock);
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_icmp.h b/include/linux/netfilter_ipv4/ip_conntrack_icmp.h
new file mode 100644
index 000000000000..f1664abbe392
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ip_conntrack_icmp.h
@@ -0,0 +1,11 @@
+#ifndef _IP_CONNTRACK_ICMP_H
+#define _IP_CONNTRACK_ICMP_H
+/* ICMP tracking. */
+#include <asm/atomic.h>
+
+struct ip_ct_icmp
+{
+ /* Optimization: when number in == number out, forget immediately. */
+ atomic_t count;
+};
+#endif /* _IP_CONNTRACK_ICMP_H */
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_protocol.h b/include/linux/netfilter_ipv4/ip_conntrack_protocol.h
index f5fd96690f46..83076c3c5f25 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack_protocol.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack_protocol.h
@@ -38,9 +38,9 @@ struct ip_conntrack_protocol
enum ip_conntrack_info ctinfo);
/* Called when a new connection for this protocol found;
- * returns timeout. If so, packet() called next. */
- unsigned long (*new)(struct ip_conntrack *conntrack,
- struct iphdr *iph, size_t len);
+ * returns TRUE if it's OK. If so, packet() called next. */
+ int (*new)(struct ip_conntrack *conntrack, struct iphdr *iph,
+ size_t len);
/* Module (if any) which this is connected to. */
struct module *me;
diff --git a/include/linux/raw.h b/include/linux/raw.h
index a2d9b14cd302..4736390a5db5 100644
--- a/include/linux/raw.h
+++ b/include/linux/raw.h
@@ -13,11 +13,4 @@ struct raw_config_request
__u64 block_minor;
};
-#ifdef __KERNEL__
-
-/* drivers/char/raw.c */
-extern void raw_init(void);
-
-#endif /* __KERNEL__ */
-
#endif /* __LINUX_RAW_H */
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 97dbc003473b..d02476de1485 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1572,7 +1572,7 @@ extern wait_queue_head_t reiserfs_commit_thread_wait ;
#define JOURNAL_MAX_BATCH 900 /* max blocks to batch into one transaction, don't make this any bigger than 900 */
#define JOURNAL_MAX_COMMIT_AGE 30
#define JOURNAL_MAX_TRANS_AGE 30
-#define JOURNAL_PER_BALANCE_CNT 12 /* must be >= (5 + 2 * (MAX_HEIGHT-2) + 1) */
+#define JOURNAL_PER_BALANCE_CNT (3 * (MAX_HEIGHT-2) + 9)
/* both of these can be as low as 1, or as high as you want. The min is the
** number of 4k bitmap nodes preallocated on mount. New nodes are allocated
@@ -1950,6 +1950,7 @@ int reiserfs_new_unf_blocknrs2 (struct reiserfs_transaction_handle *th,
void reiserfs_discard_prealloc (struct reiserfs_transaction_handle *th,
struct inode * inode);
+void reiserfs_discard_all_prealloc (struct reiserfs_transaction_handle *th);
#endif
/* hashes.c */
diff --git a/include/linux/reiserfs_fs_i.h b/include/linux/reiserfs_fs_i.h
index 3a60b86675c5..39c37e2045c6 100644
--- a/include/linux/reiserfs_fs_i.h
+++ b/include/linux/reiserfs_fs_i.h
@@ -1,6 +1,8 @@
#ifndef _REISER_FS_I
#define _REISER_FS_I
+#include <linux/list.h>
+
/* these are used to keep track of the pages that need
** flushing before the current transaction can commit
*/
@@ -52,7 +54,8 @@ struct reiserfs_inode_info {
//For preallocation
int i_prealloc_block;
int i_prealloc_count;
-
+ struct list_head i_prealloc_list; /* per-transaction list of inodes which
+ * have preallocated blocks */
/* I regret that you think the below
is a comment you should make.... -Hans */
//nopack-attribute
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index a6921dad0365..68d2e003b724 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -254,6 +254,7 @@ struct reiserfs_journal {
struct reiserfs_journal_cnode *j_hash_table[JOURNAL_HASH_SIZE] ; /* hash table for real buffer heads in current trans */
struct reiserfs_journal_cnode *j_list_hash_table[JOURNAL_HASH_SIZE] ; /* hash table for all the real buffer heads in all
the transactions */
+ struct list_head j_prealloc_list; /* list of inodes which have preallocated blocks */
};
#define JOURNAL_DESC_MAGIC "ReIsErLB" /* ick. magic string to find desc blocks in the journal */
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 5068f1a80656..2e1217ad1b27 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -424,6 +424,7 @@ struct usb_driver {
#define USB_ASYNC_UNLINK 0x0008
#define USB_QUEUE_BULK 0x0010
#define USB_NO_FSBR 0x0020
+#define USB_ZERO_PACKET 0x0040 // Finish bulk OUTs always with zero length packet
#define USB_TIMEOUT_KILLED 0x1000 // only set by HCD!
typedef struct