Whamcloud - gitweb
merge HEAD to b_eq: tag 20031230
authorericm <ericm>
Tue, 30 Dec 2003 08:25:30 +0000 (08:25 +0000)
committerericm <ericm>
Tue, 30 Dec 2003 08:25:30 +0000 (08:25 +0000)
lustre/include/linux/lustre_log.h
lustre/kernel_patches/patches/configurable-x86-stack-2.4.20.patch
lustre/kernel_patches/patches/tcp_zero_copy_2.4.20_chaos.patch
lustre/llite/llite_lib.c
lustre/obdfilter/filter_internal.h
lustre/obdfilter/filter_io.c

index 4a7b124..c3ff249 100644 (file)
@@ -170,6 +170,9 @@ struct llog_operations {
         /* XXX add 2 more: commit callbacks and llog recovery functions */
 };
 
+/* llog_lvfs.c */
+int llog_get_cat_list(struct obd_device *obd, struct obd_device *disk_obd,
+                      char *name, int count, struct llog_logid *idarray);
 extern struct llog_operations llog_lvfs_ops;
 
 
@@ -231,12 +234,7 @@ static inline int llog_handle2ops(struct llog_handle *loghandle,
 
 static inline int llog_data_len(int len)
 {
-        int mask = LLOG_MIN_REC_SIZE - 1;
-        int remains = LLOG_MIN_REC_SIZE - sizeof(struct llog_rec_hdr) -
-                sizeof(struct llog_rec_tail); 
-        
-        return (len <= remains) ? 
-                remains : (((len + mask) & (~mask)) + remains);
+        return size_round(len);
 }
 
 static inline struct llog_ctxt *llog_get_context(struct obd_device *obd,
@@ -268,7 +266,7 @@ static inline int llog_write_rec(struct llog_handle *handle,
                                 + sizeof(struct llog_rec_tail);
         else
                 buflen = le32_to_cpu(rec->lrh_len);
-        LASSERT((buflen % LLOG_MIN_REC_SIZE) == 0);
+        LASSERT(size_round(buflen) == buflen);
 
         rc = lop->lop_write_rec(handle, rec, logcookies, numcookies, buf, idx);
         RETURN(rc);
index 4fc4938..a538239 100644 (file)
@@ -1,7 +1,7 @@
-Index: linux-2.4.20/arch/i386/kernel/entry.S
+Index: kernel-2.4.21/arch/i386/kernel/entry.S
 ===================================================================
---- linux-2.4.20.orig/arch/i386/kernel/entry.S 2003-05-16 05:28:59.000000000 +0400
-+++ linux-2.4.20/arch/i386/kernel/entry.S      2003-12-01 16:54:50.000000000 +0300
+--- kernel-2.4.21.orig/arch/i386/kernel/entry.S        2003-06-13 07:51:29.000000000 -0700
++++ kernel-2.4.21/arch/i386/kernel/entry.S     2003-12-04 11:57:01.000000000 -0800
 @@ -45,6 +45,7 @@
  #include <linux/linkage.h>
  #include <asm/segment.h>
@@ -39,10 +39,10 @@ Index: linux-2.4.20/arch/i386/kernel/entry.S
        movl exec_domain(%ebx),%edx     # Get the execution domain
        movl 4(%edx),%edx       # Get the lcall7 handler for the domain
        pushl $0x27
-Index: linux-2.4.20/arch/i386/kernel/smpboot.c
+Index: kernel-2.4.21/arch/i386/kernel/smpboot.c
 ===================================================================
---- linux-2.4.20.orig/arch/i386/kernel/smpboot.c       2003-05-16 05:28:59.000000000 +0400
-+++ linux-2.4.20/arch/i386/kernel/smpboot.c    2003-12-01 16:54:50.000000000 +0300
+--- kernel-2.4.21.orig/arch/i386/kernel/smpboot.c      2003-06-13 07:51:29.000000000 -0700
++++ kernel-2.4.21/arch/i386/kernel/smpboot.c   2003-12-04 11:57:01.000000000 -0800
 @@ -819,7 +819,7 @@
  
        /* So we see what's up   */
@@ -70,10 +70,10 @@ Index: linux-2.4.20/arch/i386/kernel/smpboot.c
  
        if(clustered_apic_mode == CLUSTERED_APIC_NUMAQ) {
                printk("Restoring NMI vector\n");
-Index: linux-2.4.20/arch/i386/kernel/traps.c
+Index: kernel-2.4.21/arch/i386/kernel/traps.c
 ===================================================================
---- linux-2.4.20.orig/arch/i386/kernel/traps.c 2003-12-01 16:53:23.000000000 +0300
-+++ linux-2.4.20/arch/i386/kernel/traps.c      2003-12-01 16:54:50.000000000 +0300
+--- kernel-2.4.21.orig/arch/i386/kernel/traps.c        2002-11-28 15:53:09.000000000 -0800
++++ kernel-2.4.21/arch/i386/kernel/traps.c     2003-12-04 11:57:01.000000000 -0800
 @@ -158,7 +158,7 @@
        unsigned long esp = tsk->thread.esp;
  
@@ -83,10 +83,10 @@ Index: linux-2.4.20/arch/i386/kernel/traps.c
                return;
        show_trace((unsigned long *)esp);
  }
-Index: linux-2.4.20/arch/i386/kernel/head.S
+Index: kernel-2.4.21/arch/i386/kernel/head.S
 ===================================================================
---- linux-2.4.20.orig/arch/i386/kernel/head.S  2003-05-16 05:28:28.000000000 +0400
-+++ linux-2.4.20/arch/i386/kernel/head.S       2003-12-01 16:54:50.000000000 +0300
+--- kernel-2.4.21.orig/arch/i386/kernel/head.S 2003-06-13 07:51:29.000000000 -0700
++++ kernel-2.4.21/arch/i386/kernel/head.S      2003-12-04 11:57:01.000000000 -0800
 @@ -15,6 +15,7 @@
  #include <asm/page.h>
  #include <asm/pgtable.h>
@@ -104,10 +104,10 @@ Index: linux-2.4.20/arch/i386/kernel/head.S
        .long __KERNEL_DS
  
  /* This is the default interrupt "handler" :-) */
-Index: linux-2.4.20/arch/i386/kernel/irq.c
+Index: kernel-2.4.21/arch/i386/kernel/irq.c
 ===================================================================
---- linux-2.4.20.orig/arch/i386/kernel/irq.c   2003-05-16 05:28:59.000000000 +0400
-+++ linux-2.4.20/arch/i386/kernel/irq.c        2003-12-01 16:57:05.000000000 +0300
+--- kernel-2.4.21.orig/arch/i386/kernel/irq.c  2002-11-28 15:53:09.000000000 -0800
++++ kernel-2.4.21/arch/i386/kernel/irq.c       2003-12-04 11:57:01.000000000 -0800
 @@ -581,7 +581,10 @@
        long esp;
  
@@ -120,10 +120,10 @@ Index: linux-2.4.20/arch/i386/kernel/irq.c
        if (unlikely(esp < (sizeof(struct task_struct) + 1024))) {
                extern void show_stack(unsigned long *);
  
-Index: linux-2.4.20/arch/i386/lib/getuser.S
+Index: kernel-2.4.21/arch/i386/lib/getuser.S
 ===================================================================
---- linux-2.4.20.orig/arch/i386/lib/getuser.S  1998-01-13 00:42:52.000000000 +0300
-+++ linux-2.4.20/arch/i386/lib/getuser.S       2003-12-01 16:54:50.000000000 +0300
+--- kernel-2.4.21.orig/arch/i386/lib/getuser.S 1998-01-12 13:42:52.000000000 -0800
++++ kernel-2.4.21/arch/i386/lib/getuser.S      2003-12-04 11:57:01.000000000 -0800
 @@ -21,6 +21,10 @@
   * as they get called from within inline assembly.
   */
@@ -162,11 +162,11 @@ Index: linux-2.4.20/arch/i386/lib/getuser.S
        cmpl addr_limit(%edx),%eax
        jae bad_get_user
  3:    movl -3(%eax),%edx
-Index: linux-2.4.20/arch/i386/config.in
+Index: kernel-2.4.21/arch/i386/config.in
 ===================================================================
---- linux-2.4.20.orig/arch/i386/config.in      2003-05-16 05:28:59.000000000 +0400
-+++ linux-2.4.20/arch/i386/config.in   2003-12-01 17:01:56.000000000 +0300
-@@ -227,6 +227,29 @@
+--- kernel-2.4.21.orig/arch/i386/config.in     2003-06-13 07:51:29.000000000 -0700
++++ kernel-2.4.21/arch/i386/config.in  2003-12-04 11:57:01.000000000 -0800
+@@ -256,6 +256,29 @@
  if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then
     define_bool CONFIG_HAVE_DEC_LOCK y
  fi
@@ -196,10 +196,10 @@ Index: linux-2.4.20/arch/i386/config.in
  endmenu
  
  mainmenu_option next_comment
-Index: linux-2.4.20/arch/i386/vmlinux.lds
+Index: kernel-2.4.21/arch/i386/vmlinux.lds
 ===================================================================
---- linux-2.4.20.orig/arch/i386/vmlinux.lds    2003-05-16 05:28:09.000000000 +0400
-+++ linux-2.4.20/arch/i386/vmlinux.lds 2003-12-01 16:54:50.000000000 +0300
+--- kernel-2.4.21.orig/arch/i386/vmlinux.lds   2002-02-25 11:37:53.000000000 -0800
++++ kernel-2.4.21/arch/i386/vmlinux.lds        2003-12-04 11:57:01.000000000 -0800
 @@ -35,7 +35,8 @@
  
    _edata = .;                 /* End of data section */
@@ -210,10 +210,10 @@ Index: linux-2.4.20/arch/i386/vmlinux.lds
    .data.init_task : { *(.data.init_task) }
  
    . = ALIGN(4096);            /* Init code and data */
-Index: linux-2.4.20/include/asm-i386/current.h
+Index: kernel-2.4.21/include/asm-i386/current.h
 ===================================================================
---- linux-2.4.20.orig/include/asm-i386/current.h       1998-08-15 03:35:22.000000000 +0400
-+++ linux-2.4.20/include/asm-i386/current.h    2003-12-01 16:54:50.000000000 +0300
+--- kernel-2.4.21.orig/include/asm-i386/current.h      1998-08-14 16:35:22.000000000 -0700
++++ kernel-2.4.21/include/asm-i386/current.h   2003-12-04 11:57:01.000000000 -0800
 @@ -1,15 +1,43 @@
  #ifndef _I386_CURRENT_H
  #define _I386_CURRENT_H
@@ -259,10 +259,10 @@ Index: linux-2.4.20/include/asm-i386/current.h
 +#endif /* __ASSEMBLY__ */
 +
  #endif /* !(_I386_CURRENT_H) */
-Index: linux-2.4.20/include/asm-i386/hw_irq.h
+Index: kernel-2.4.21/include/asm-i386/hw_irq.h
 ===================================================================
---- linux-2.4.20.orig/include/asm-i386/hw_irq.h        2003-11-13 17:17:28.000000000 +0300
-+++ linux-2.4.20/include/asm-i386/hw_irq.h     2003-12-01 16:54:50.000000000 +0300
+--- kernel-2.4.21.orig/include/asm-i386/hw_irq.h       2001-11-22 11:46:18.000000000 -0800
++++ kernel-2.4.21/include/asm-i386/hw_irq.h    2003-12-04 11:57:01.000000000 -0800
 @@ -15,6 +15,7 @@
  #include <linux/config.h>
  #include <asm/atomic.h>
@@ -282,10 +282,10 @@ Index: linux-2.4.20/include/asm-i386/hw_irq.h
  /*
   *    SMP has a few special interrupts for IPI messages
   */
-Index: linux-2.4.20/include/asm-i386/processor.h
+Index: kernel-2.4.21/include/asm-i386/processor.h
 ===================================================================
---- linux-2.4.20.orig/include/asm-i386/processor.h     2003-11-21 17:39:47.000000000 +0300
-+++ linux-2.4.20/include/asm-i386/processor.h  2003-12-01 16:54:50.000000000 +0300
+--- kernel-2.4.21.orig/include/asm-i386/processor.h    2003-06-13 07:51:38.000000000 -0700
++++ kernel-2.4.21/include/asm-i386/processor.h 2003-12-04 11:57:01.000000000 -0800
 @@ -14,6 +14,7 @@
  #include <asm/types.h>
  #include <asm/sigcontext.h>
@@ -294,7 +294,7 @@ Index: linux-2.4.20/include/asm-i386/processor.h
  #include <linux/cache.h>
  #include <linux/config.h>
  #include <linux/threads.h>
-@@ -451,9 +452,6 @@
+@@ -453,9 +454,6 @@
  #define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1019])
  #define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1022])
  
@@ -304,10 +304,10 @@ Index: linux-2.4.20/include/asm-i386/processor.h
  #define get_task_struct(tsk)      atomic_inc(&virt_to_page(tsk)->count)
  
  #define init_task     (init_task_union.task)
-Index: linux-2.4.20/include/linux/sched.h
+Index: kernel-2.4.21/include/linux/sched.h
 ===================================================================
---- linux-2.4.20.orig/include/linux/sched.h    2003-11-21 17:39:47.000000000 +0300
-+++ linux-2.4.20/include/linux/sched.h 2003-12-01 16:54:50.000000000 +0300
+--- kernel-2.4.21.orig/include/linux/sched.h   2003-06-13 15:26:52.000000000 -0700
++++ kernel-2.4.21/include/linux/sched.h        2003-12-04 12:00:14.000000000 -0800
 @@ -2,6 +2,7 @@
  #define _LINUX_SCHED_H
  
@@ -316,3 +316,15 @@ Index: linux-2.4.20/include/linux/sched.h
  
  extern unsigned long event;
  
+Index: kernel-2.4.21/include/asm-x86_64/current.h
+===================================================================
+--- kernel-2.4.21.orig/include/asm-x86_64/current.h    2003-06-13 15:26:52.000000000 -0700
++++ kernel-2.4.21/include/asm-x86_64/current.h 2003-12-04 12:00:13.000000000 -0800
+@@ -5,6 +5,7 @@
+ struct task_struct;
+ #include <asm/pda.h>
++#include <asm/page.h>
+ static inline struct task_struct *get_current(void) 
+ { 
index dfb4de5..a64ecf9 100644 (file)
@@ -5,9 +5,11 @@
  net/netsyms.c          |    2 
  5 files changed, 311 insertions(+), 3 deletions(-)
 
---- kernel-2.4.20-6chaos_18_7/include/linux/skbuff.h~tcp_zero_copy_2.4.20_chaos        2003-06-24 11:31:17.000000000 -0600
-+++ kernel-2.4.20-6chaos_18_7-braam/include/linux/skbuff.h     2003-07-12 15:38:07.000000000 -0600
-@@ -116,6 +116,30 @@ struct skb_frag_struct
+Index: linux-2.4.20-rh-20.9/include/linux/skbuff.h
+===================================================================
+--- linux-2.4.20-rh-20.9.orig/include/linux/skbuff.h   2003-09-13 19:34:24.000000000 +0400
++++ linux-2.4.20-rh-20.9/include/linux/skbuff.h        2003-12-19 14:14:55.000000000 +0300
+@@ -116,6 +116,30 @@
        __u16 size;
  };
  
@@ -38,7 +40,7 @@
  /* This data is invariant across clones and lives at
   * the end of the header data, ie. at skb->end.
   */
-@@ -123,6 +147,12 @@ struct skb_shared_info {
+@@ -123,6 +147,12 @@
        atomic_t        dataref;
        unsigned int    nr_frags;
        struct sk_buff  *frag_list;
        skb_frag_t      frags[MAX_SKB_FRAGS];
  };
  
---- kernel-2.4.20-6chaos_18_7/include/net/tcp.h~tcp_zero_copy_2.4.20_chaos     2003-06-24 11:31:17.000000000 -0600
-+++ kernel-2.4.20-6chaos_18_7-braam/include/net/tcp.h  2003-07-12 15:38:07.000000000 -0600
-@@ -643,6 +643,8 @@ extern int                 tcp_v4_tw_remember_stam
+Index: linux-2.4.20-rh-20.9/include/net/tcp.h
+===================================================================
+--- linux-2.4.20-rh-20.9.orig/include/net/tcp.h        2003-09-13 19:34:25.000000000 +0400
++++ linux-2.4.20-rh-20.9/include/net/tcp.h     2003-12-19 14:14:55.000000000 +0300
+@@ -643,6 +643,8 @@
  
  extern int                    tcp_sendmsg(struct sock *sk, struct msghdr *msg, int size);
  extern ssize_t                        tcp_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags);
@@ -62,7 +66,7 @@
  
  extern int                    tcp_ioctl(struct sock *sk, 
                                          int cmd, 
-@@ -737,6 +739,9 @@ extern int                 tcp_recvmsg(struct sock *sk
+@@ -737,6 +739,9 @@
                                            struct msghdr *msg,
                                            int len, int nonblock, 
                                            int flags, int *addr_len);
  
  extern int                    tcp_listen_start(struct sock *sk);
  
---- kernel-2.4.20-6chaos_18_7/net/netsyms.c~tcp_zero_copy_2.4.20_chaos 2003-05-15 21:15:18.000000000 -0600
-+++ kernel-2.4.20-6chaos_18_7-braam/net/netsyms.c      2003-07-12 15:38:54.000000000 -0600
-@@ -397,6 +397,8 @@ EXPORT_SYMBOL(sysctl_tcp_wmem);
+Index: linux-2.4.20-rh-20.9/net/netsyms.c
+===================================================================
+--- linux-2.4.20-rh-20.9.orig/net/netsyms.c    2003-09-13 19:34:24.000000000 +0400
++++ linux-2.4.20-rh-20.9/net/netsyms.c 2003-12-19 14:15:24.000000000 +0300
+@@ -396,7 +396,7 @@
+ EXPORT_SYMBOL(sysctl_tcp_wmem);
  EXPORT_SYMBOL(sysctl_tcp_ecn);
  EXPORT_SYMBOL(tcp_cwnd_application_limited);
- EXPORT_SYMBOL(tcp_sendpage);
-+EXPORT_SYMBOL(tcp_sendpage_zccd);
+-EXPORT_SYMBOL(tcp_sendpage);
 +EXPORT_SYMBOL(tcp_recvpackets);
  EXPORT_SYMBOL(sysctl_tcp_low_latency);
  
  EXPORT_SYMBOL(tcp_write_xmit);
---- kernel-2.4.20-6chaos_18_7/net/core/skbuff.c~tcp_zero_copy_2.4.20_chaos     2003-05-15 21:15:21.000000000 -0600
-+++ kernel-2.4.20-6chaos_18_7-braam/net/core/skbuff.c  2003-07-12 15:38:07.000000000 -0600
-@@ -208,6 +208,8 @@ struct sk_buff *alloc_skb(unsigned int s
+@@ -417,6 +417,8 @@
+ #endif
++EXPORT_SYMBOL(tcp_sendpage);
++EXPORT_SYMBOL(tcp_sendpage_zccd);
+ EXPORT_SYMBOL(tcp_read_sock);
+ EXPORT_SYMBOL(netlink_set_err);
+Index: linux-2.4.20-rh-20.9/net/core/skbuff.c
+===================================================================
+--- linux-2.4.20-rh-20.9.orig/net/core/skbuff.c        2003-09-13 19:34:19.000000000 +0400
++++ linux-2.4.20-rh-20.9/net/core/skbuff.c     2003-12-19 14:14:56.000000000 +0300
+@@ -208,6 +208,8 @@
        atomic_set(&(skb_shinfo(skb)->dataref), 1);
        skb_shinfo(skb)->nr_frags = 0;
        skb_shinfo(skb)->frag_list = NULL;
        return skb;
  
  nodata:
-@@ -276,6 +278,10 @@ static void skb_release_data(struct sk_b
+@@ -276,6 +278,10 @@
  {
        if (!skb->cloned ||
            atomic_dec_and_test(&(skb_shinfo(skb)->dataref))) {
                if (skb_shinfo(skb)->nr_frags) {
                        int i;
                        for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
-@@ -532,6 +538,8 @@ int skb_linearize(struct sk_buff *skb, i
+@@ -532,6 +538,8 @@
        atomic_set(&(skb_shinfo(skb)->dataref), 1);
        skb_shinfo(skb)->nr_frags = 0;
        skb_shinfo(skb)->frag_list = NULL;
  
        /* We are no longer a clone, even if we were. */
        skb->cloned = 0;
-@@ -578,6 +586,14 @@ struct sk_buff *pskb_copy(struct sk_buff
+@@ -578,6 +586,14 @@
        n->data_len = skb->data_len;
        n->len = skb->len;
  
        if (skb_shinfo(skb)->nr_frags) {
                int i;
  
-@@ -620,6 +636,8 @@ int pskb_expand_head(struct sk_buff *skb
+@@ -620,6 +636,8 @@
        u8 *data;
        int size = nhead + (skb->end - skb->head) + ntail;
        long off;
  
        if (skb_shared(skb))
                BUG();
-@@ -641,6 +659,11 @@ int pskb_expand_head(struct sk_buff *skb
+@@ -641,6 +659,11 @@
        if (skb_shinfo(skb)->frag_list)
                skb_clone_fraglist(skb);
  
        skb_release_data(skb);
  
        off = (data+nhead) - skb->head;
-@@ -655,6 +678,8 @@ int pskb_expand_head(struct sk_buff *skb
+@@ -655,6 +678,8 @@
        skb->nh.raw += off;
        skb->cloned = 0;
        atomic_set(&skb_shinfo(skb)->dataref, 1);
        return 0;
  
  nodata:
---- kernel-2.4.20-6chaos_18_7/net/ipv4/tcp.c~tcp_zero_copy_2.4.20_chaos        2003-05-15 21:15:21.000000000 -0600
-+++ kernel-2.4.20-6chaos_18_7-braam/net/ipv4/tcp.c     2003-07-12 15:38:07.000000000 -0600
-@@ -747,7 +747,7 @@ do_interrupted:
+Index: linux-2.4.20-rh-20.9/net/ipv4/tcp.c
+===================================================================
+--- linux-2.4.20-rh-20.9.orig/net/ipv4/tcp.c   2003-09-13 19:34:25.000000000 +0400
++++ linux-2.4.20-rh-20.9/net/ipv4/tcp.c        2003-12-19 14:14:56.000000000 +0300
+@@ -747,7 +747,7 @@
        goto out;
  }
  
  
  static inline int
  can_coalesce(struct sk_buff *skb, int i, struct page *page, int off)
-@@ -826,7 +826,8 @@ static int tcp_error(struct sock *sk, in
+@@ -826,7 +826,8 @@
        return err;
  }
  
  {
        struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
        int mss_now;
-@@ -874,6 +875,17 @@ new_segment:
+@@ -874,6 +875,17 @@
                        copy = size;
  
                i = skb_shinfo(skb)->nr_frags;
                if (can_coalesce(skb, i, page, offset)) {
                        skb_shinfo(skb)->frags[i-1].size += copy;
                } else if (i < MAX_SKB_FRAGS) {
-@@ -884,6 +896,20 @@ new_segment:
+@@ -884,6 +896,20 @@
                        goto new_segment;
                }
  
                skb->len += copy;
                skb->data_len += copy;
                skb->ip_summed = CHECKSUM_HW;
-@@ -947,7 +973,31 @@ ssize_t tcp_sendpage(struct socket *sock
+@@ -947,7 +973,31 @@
  
        lock_sock(sk);
        TCP_CHECK_TIMER(sk);
        TCP_CHECK_TIMER(sk);
        release_sock(sk);
        return res;
-@@ -1771,6 +1821,202 @@ recv_urg:
+@@ -1771,6 +1821,202 @@
        goto out;
  }
  
  /*
   *    State processing on a close. This implements the state shift for
   *    sending our FIN frame. Note that we only send a FIN for some
-
-_
index deaa355..df2daa7 100644 (file)
@@ -53,6 +53,9 @@ struct ll_sb_info *lustre_init_sbi(struct super_block *sb)
         if (!sbi)
                 RETURN(NULL);
 
+        spin_lock_init(&sbi->ll_pglist_lock);
+        INIT_LIST_HEAD(&sbi->ll_pglist);
+        sbi->ll_pglist_gen = 0;
         INIT_LIST_HEAD(&sbi->ll_conn_chain);
         INIT_HLIST_HEAD(&sbi->ll_orphan_dentry_list);
         ll_s2sbi(sb) = sbi;
@@ -103,7 +106,12 @@ int lustre_common_fill_super(struct super_block *sb, char *mdc, char *osc)
         mdc_init_ea_size(obd, osc);
 
         err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid);
-        if (err) {
+        if (err == -EBUSY) {
+                CERROR("An MDS (mdc %s) is performing recovery, of which this"
+                       " client is not a part.  Please wait for recovery to "
+                       "complete, abort, or time out.\n", mdc);
+                GOTO(out, err);
+        } else if (err) {
                 CERROR("cannot connect to %s: rc = %d\n", mdc, err);
                 GOTO(out, err);
         }
@@ -130,7 +138,12 @@ int lustre_common_fill_super(struct super_block *sb, char *mdc, char *osc)
         }
 
         err = obd_connect(&osc_conn, obd, &sbi->ll_sb_uuid);
-        if (err) {
+        if (err == -EBUSY) {
+                CERROR("An OST (osc %s) is performing recovery, of which this"
+                       " client is not a part.  Please wait for recovery to "
+                       "complete, abort, or time out.\n", osc);
+                GOTO(out, err);
+        } else if (err) {
                 CERROR("cannot connect to %s: rc = %d\n", osc, err);
                 GOTO(out_mdc, err);
         }
@@ -1066,29 +1079,17 @@ void ll_read_inode2(struct inode *inode, void *opaque)
         } else {
                 inode->i_op = &ll_special_inode_operations;
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-                init_special_inode(inode, inode->i_mode, 
+                init_special_inode(inode, inode->i_mode,
                                    kdev_t_to_nr(inode->i_rdev));
 #else
                 init_special_inode(inode, inode->i_mode, inode->i_rdev);
-                
-                lli->ll_save_ifop = inode->i_fop;
-                if (S_ISCHR(inode->i_mode)) {
-                        inode->i_fop = &ll_special_chr_inode_fops;                                                         
-                }else if (S_ISBLK(inode->i_mode)) {
-                        inode->i_fop = &ll_special_blk_inode_fops; 
-                }else if (S_ISFIFO(inode->i_mode)){
-                        inode->i_fop = &ll_special_fifo_inode_fops;
-                }else if (S_ISSOCK(inode->i_mode)){ 
-                        inode->i_fop = &ll_special_sock_inode_fops;
-                }                                               
-                inode->i_fop->owner = lli->ll_save_ifop->owner;
 #endif
                 EXIT;
         }
 }
 
 int ll_iocontrol(struct inode *inode, struct file *file,
-                        unsigned int cmd, unsigned long arg)
+                 unsigned int cmd, unsigned long arg)
 {
         struct ll_sb_info *sbi = ll_i2sbi(inode);
         struct ptlrpc_request *req = NULL;
index da8faa3..610d969 100644 (file)
@@ -41,7 +41,6 @@
 #define FILTER_SUBDIR_COUNT      32            /* set to zero for no subdirs */
 #define FILTER_GROUPS 3 /* must be at least 3; not dynamic yet */
 
-#define FILTER_MOUNT_RECOV 2
 #define FILTER_RECOVERY_TIMEOUT (obd_timeout * 5 * HZ / 2) /* *waves hands* */
 
 #define FILTER_ROCOMPAT_SUPP   (0)
@@ -73,9 +72,8 @@ struct filter_server_data {
 struct filter_client_data {
         __u8  fcd_uuid[40];        /* client UUID */
         __u64 fcd_last_rcvd;       /* last completed transaction ID */
-        __u64 fcd_mount_count;     /* FILTER incarnation number */
         __u64 fcd_last_xid;        /* client RPC xid for the last transaction */
-        __u8  fcd_padding[FILTER_LR_CLIENT_SIZE - 64];
+        __u8  fcd_padding[FILTER_LR_CLIENT_SIZE - 56];
 };
 
 #define FILTER_DENTRY_MAGIC 0x9efba101
@@ -149,5 +147,22 @@ int filter_san_setup(struct obd_device *obd, obd_count len, void *buf);
 int filter_san_preprw(int cmd, struct obd_export *, struct obdo *, int objcount,
                       struct obd_ioobj *, int niocount, struct niobuf_remote *);
 
+#ifdef __KERNEL__
+void filter_tally_write(struct filter_obd *filter, struct page **pages,
+                        int nr_pages, unsigned long *blocks, 
+                        int blocks_per_page);
+void filter_tally_read(struct filter_obd *filter, struct niobuf_local *lnb, 
+                       int niocount);
+int lproc_filter_attach_seqstat(struct obd_device *dev);
+#else
+static inline filter_tally_write(struct filter_obd *filter, 
+                                 struct page **pages, int nr_pages, 
+                                 unsigned long *blocks, int blocks_per_page) {}
+static inline void  filter_tally_read(struct filter_obd *filter, 
+                                      struct niobuf_local *lnb, int niocount)
+                                      {}
+static inline lproc_filter_attach_seqstat(struct obd_device *dev) {}
+#endif
+
 
 #endif
index 1ce8825..774e669 100644 (file)
@@ -213,6 +213,8 @@ static int filter_preprw_read(int cmd, struct obd_export *exp, struct obdo *oa,
                 CDEBUG(D_INFO, "finish_page_read: %lu jiffies\n",
                        (jiffies - now));
 
+        filter_tally_read(&exp->exp_obd->u.filter, res, niocount);
+
         EXIT;
 
  cleanup: