arla0.28 on Linux 2.3.28

yasushi@cs.washington.edu yasushi at cs.washington.edu
Wed Nov 24 21:12:59 CET 1999


Here's a quick&dirty patch to make Arla work on the latest 2.3
kernel..

yaz


diff -rc ./linux/xfs/xfs_locl.h /local/arla-0.28.org/xfs/linux/xfs/xfs_locl.h
*** ./linux/xfs/xfs_locl.h	Mon Nov 22 20:43:45 1999
--- /local/arla-0.28.org/xfs/linux/xfs/xfs_locl.h	Tue Oct  5 15:17:51 1999
***************
*** 73,82 ****
  # define DEVFS_SUPPORT
  #endif
  
- #if LINUX_VERSION_CODE >= 0x20300
- #define LINUX2_3 1 
- #endif
- 
  #if LINUX_VERSION_CODE > 131238
  #define LINUX2_1 1
  #endif
--- 73,78 ----
diff -rc ./linux/xfs_dev.c /local/arla-0.28.org/xfs/linux/xfs_dev.c
*** ./linux/xfs_dev.c	Tue Nov 23 19:43:07 1999
--- /local/arla-0.28.org/xfs/linux/xfs_dev.c	Thu Sep 23 18:13:09 1999
***************
*** 708,719 ****
      struct xfs_channel *chan = &xfs_channel[0];
      struct xfs_link *sleepq = &chan->sleepq;
      struct xfs_link *t = chan->sleepq.next; /* Really first in q */
! #if 0
      printk("Sleeping:");
      for (; t != sleepq; t = t->next) {
  	printk(" %d", t->message->sequence_num);
  	if (t->wait_queue && t->wait_queue->task)
  	    printk(" (pid %d)", t->wait_queue->task->pid);
      }
- #endif
  }
--- 708,718 ----
      struct xfs_channel *chan = &xfs_channel[0];
      struct xfs_link *sleepq = &chan->sleepq;
      struct xfs_link *t = chan->sleepq.next; /* Really first in q */
! 
      printk("Sleeping:");
      for (; t != sleepq; t = t->next) {
  	printk(" %d", t->message->sequence_num);
  	if (t->wait_queue && t->wait_queue->task)
  	    printk(" (pid %d)", t->wait_queue->task->pid);
      }
  }
diff -rc ./linux/xfs_inodeops.c /local/arla-0.28.org/xfs/linux/xfs_inodeops.c
*** ./linux/xfs_inodeops.c	Tue Nov 23 19:46:07 1999
--- /local/arla-0.28.org/xfs/linux/xfs_inodeops.c	Mon Oct 18 17:44:12 1999
***************
*** 49,68 ****
  
  RCSID("$Id: xfs_inodeops.c,v 1.92 1999/10/19 00:44:12 map Exp $");
  
! #ifdef LINUX2_3
! #define LOOKUP_RETURN_TYPE struct dentry *
! #else
! #define LOOKUP_RETURN_TYPE int
! #define ERR_PTR(x) x
! #endif
! 
! static 
  #ifndef LINUX2_1
- int 
  xfs_lookup (struct inode * dir, const char * name, int len,
  	    struct inode ** result);
  #else
- LOOKUP_RETURN_TYPE
  xfs_lookup (struct inode *inode, struct dentry *dentry);
  #endif /* LINUX2_1 */
  
--- 49,59 ----
  
  RCSID("$Id: xfs_inodeops.c,v 1.92 1999/10/19 00:44:12 map Exp $");
  
! static int
  #ifndef LINUX2_1
  xfs_lookup (struct inode * dir, const char * name, int len,
  	    struct inode ** result);
  #else
  xfs_lookup (struct inode *inode, struct dentry *dentry);
  #endif /* LINUX2_1 */
  
***************
*** 212,223 ****
  xfs_d_delete(struct dentry *dentry);
  
  static int
! xfs_d_validate(struct dentry *dentry, int flags);
  
  static void
  xfs_d_release(struct dentry *dentry);
  
! static LOOKUP_RETURN_TYPE
  xfs_dead_lookup (struct inode *dir, struct dentry *dentry);
  #endif
  
--- 203,214 ----
  xfs_d_delete(struct dentry *dentry);
  
  static int
! xfs_d_validate(struct dentry *dentry);
  
  static void
  xfs_d_release(struct dentry *dentry);
  
! static int
  xfs_dead_lookup (struct inode *dir, struct dentry *dentry);
  #endif
  
***************
*** 253,262 ****
          NULL,                   /* rename */
          NULL,                   /* readlink */
          NULL,                   /* follow_link */
- 	NULL,                   /* get_block */
          xfs_readpage,           /* readpage */
          NULL,                   /* writepage */
!         NULL,                   /* flushpage */
          NULL,                   /* truncate */
          xfs_permission,         /* permission */
          NULL,			/* smap */
--- 244,252 ----
          NULL,                   /* rename */
          NULL,                   /* readlink */
          NULL,                   /* follow_link */
          xfs_readpage,           /* readpage */
          NULL,                   /* writepage */
!         NULL,                   /* bmap */
          NULL,                   /* truncate */
          xfs_permission,         /* permission */
          NULL,			/* smap */
***************
*** 307,313 ****
          NULL,                   /* rename */
          NULL,                   /* readlink */
          NULL,                   /* follow_link */
- 	NULL,                   /* get_block */
          NULL,                   /* readpage */
          NULL,                   /* writepage */
          NULL,                   /* bmap */
--- 297,302 ----
***************
*** 348,357 ****
          xfs_rename,             /* rename */
          NULL,                   /* readlink */
          NULL,                   /* follow_link */
- 	NULL,                   /* get_block */
          NULL,                   /* readpage */
          NULL,                   /* writepage */
!         NULL,                   /* flushpage */
          NULL,                   /* truncate */
          xfs_permission,         /* permission */
          NULL,                   /* smap */
--- 337,345 ----
          xfs_rename,             /* rename */
          NULL,                   /* readlink */
          NULL,                   /* follow_link */
          NULL,                   /* readpage */
          NULL,                   /* writepage */
!         NULL,                   /* bmap */
          NULL,                   /* truncate */
          xfs_permission,         /* permission */
          NULL,                   /* smap */
***************
*** 504,510 ****
          XFSDEB(XDEBVNOPS, ("error %d", error));
      XFSDEB(XDEBVNOPS, ("\n"));
      iput(dir);
!     return ERR_PTR(error);
  }
  #else
  void
--- 492,498 ----
          XFSDEB(XDEBVNOPS, ("error %d", error));
      XFSDEB(XDEBVNOPS, ("\n"));
      iput(dir);
!     return error;
  }
  #else
  void
***************
*** 544,550 ****
      dentry->d_fsdata = NULL;
  }
  
! static LOOKUP_RETURN_TYPE
  xfs_lookup (struct inode *dir, struct dentry *dentry)
  {
      struct xfs_message_getnode msg;
--- 532,538 ----
      dentry->d_fsdata = NULL;
  }
  
! static int
  xfs_lookup (struct inode *dir, struct dentry *dentry)
  {
      struct xfs_message_getnode msg;
***************
*** 558,564 ****
      
      if (dir == NULL) {
          XFSDEB(XDEBVNOPS, ("ENOENT\n"));
!         return ERR_PTR(-ENOENT);
      }
  
      XFSDEB(XDEBVNOPS, ("xfs_lookup: dir: %p\n", dir));
--- 546,552 ----
      
      if (dir == NULL) {
          XFSDEB(XDEBVNOPS, ("ENOENT\n"));
!         return -ENOENT;
      }
  
      XFSDEB(XDEBVNOPS, ("xfs_lookup: dir: %p\n", dir));
***************
*** 567,573 ****
      d = VNODE_TO_XNODE(dir);
      if (d == NULL || xfsp == NULL) {
          XFSDEB(XDEBVNOPS, ("ENODEV\n"));
!         return ERR_PTR(-ENODEV);
      }
  
  
--- 555,561 ----
      d = VNODE_TO_XNODE(dir);
      if (d == NULL || xfsp == NULL) {
          XFSDEB(XDEBVNOPS, ("ENODEV\n"));
!         return -ENODEV;
      }
  
  
***************
*** 621,627 ****
      xfs_print_lock("xfs_lookup after up", &DENTRY_TO_XDENTRY(dentry)->sem);
      if (error)
          XFSDEB(XDEBVNOPS, ("error %d", error));
!     return ERR_PTR(error);
  }
  #endif /* LINUX2_1 */
  
--- 609,615 ----
      xfs_print_lock("xfs_lookup after up", &DENTRY_TO_XDENTRY(dentry)->sem);
      if (error)
          XFSDEB(XDEBVNOPS, ("error %d", error));
!     return error;
  }
  #endif /* LINUX2_1 */
  
***************
*** 1935,1941 ****
  
  #ifdef LINUX2_1
  static int
! xfs_d_validate(struct dentry *dentry, int flags)
  {
      struct inode *inode = DENTRY_TO_INODE(dentry);
      XFSDEB(XDEBVNOPS, ("validate %p \"%*s\" (inode %p)\n",
--- 1923,1929 ----
  
  #ifdef LINUX2_1
  static int
! xfs_d_validate(struct dentry *dentry)
  {
      struct inode *inode = DENTRY_TO_INODE(dentry);
      XFSDEB(XDEBVNOPS, ("validate %p \"%*s\" (inode %p)\n",
***************
*** 2084,2090 ****
  	return 0;
  }
  
! static LOOKUP_RETURN_TYPE
  xfs_dead_lookup (struct inode *dir, struct dentry *dentry)
  {
      int error = 0;
--- 2072,2078 ----
  	return 0;
  }
  
! static int
  xfs_dead_lookup (struct inode *dir, struct dentry *dentry)
  {
      int error = 0;
***************
*** 2104,2110 ****
  
  	error = get_new_root(dir, &new_root);
  	if (error)
! 	    return ERR_PTR(error);
  	list_del(&dentry->d_child);
  	list_add(&dentry->d_child, &new_root->d_subdirs);
  	dput(old_root);
--- 2092,2098 ----
  
  	error = get_new_root(dir, &new_root);
  	if (error)
! 	    return error;
  	list_del(&dentry->d_child);
  	list_add(&dentry->d_child, &new_root->d_subdirs);
  	dput(old_root);
***************
*** 2119,2125 ****
  
  	return DENTRY_TO_INODE(new_root)->i_op->lookup(new_root->d_inode, dentry);
      } else {
! 	return ERR_PTR(-ENOTDIR);
      }
  }
  
--- 2107,2113 ----
  
  	return DENTRY_TO_INODE(new_root)->i_op->lookup(new_root->d_inode, dentry);
      } else {
! 	return -ENOTDIR;
      }
  }





More information about the Arla-drinkers mailing list