diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-03 19:25:58 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-03 19:25:58 -0500 |
| commit | 0f3278d14f0255e4cd9e07ccefc33ff12d8bb59c (patch) | |
| tree | 9bbb209cab841f700162a96e158dfa3ecd361f46 /fs/xfs/linux-2.6 | |
| parent | 06024f217d607369f0ee0071034ebb03071d5fb2 (diff) | |
| parent | 15c84a470116b2a3b58a7353a6cf711c29a91854 (diff) | |
Merge git://oss.sgi.com:8090/oss/git/xfs-2.6
Diffstat (limited to 'fs/xfs/linux-2.6')
39 files changed, 813 insertions, 1308 deletions
diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c index 3c92162dc728..aba7fcf881a2 100644 --- a/fs/xfs/linux-2.6/kmem.c +++ b/fs/xfs/linux-2.6/kmem.c | |||
| @@ -1,49 +1,32 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
| 34 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
| 35 | #include <linux/vmalloc.h> | 20 | #include <linux/vmalloc.h> |
| 36 | #include <linux/highmem.h> | 21 | #include <linux/highmem.h> |
| 37 | #include <linux/swap.h> | 22 | #include <linux/swap.h> |
| 38 | #include <linux/blkdev.h> | 23 | #include <linux/blkdev.h> |
| 39 | |||
| 40 | #include "time.h" | 24 | #include "time.h" |
| 41 | #include "kmem.h" | 25 | #include "kmem.h" |
| 42 | 26 | ||
| 43 | #define MAX_VMALLOCS 6 | 27 | #define MAX_VMALLOCS 6 |
| 44 | #define MAX_SLAB_SIZE 0x20000 | 28 | #define MAX_SLAB_SIZE 0x20000 |
| 45 | 29 | ||
| 46 | |||
| 47 | void * | 30 | void * |
| 48 | kmem_alloc(size_t size, unsigned int __nocast flags) | 31 | kmem_alloc(size_t size, unsigned int __nocast flags) |
| 49 | { | 32 | { |
diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h index f4bb78c268c0..8f82c1a20dc5 100644 --- a/fs/xfs/linux-2.6/kmem.h +++ b/fs/xfs/linux-2.6/kmem.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_SUPPORT_KMEM_H__ | 18 | #ifndef __XFS_SUPPORT_KMEM_H__ |
| 33 | #define __XFS_SUPPORT_KMEM_H__ | 19 | #define __XFS_SUPPORT_KMEM_H__ |
| @@ -83,7 +69,7 @@ typedef unsigned long xfs_pflags_t; | |||
| 83 | 69 | ||
| 84 | static __inline gfp_t kmem_flags_convert(unsigned int __nocast flags) | 70 | static __inline gfp_t kmem_flags_convert(unsigned int __nocast flags) |
| 85 | { | 71 | { |
| 86 | gfp_t lflags = __GFP_NOWARN; /* we'll report problems, if need be */ | 72 | gfp_t lflags = __GFP_NOWARN; /* we'll report problems, if need be */ |
| 87 | 73 | ||
| 88 | #ifdef DEBUG | 74 | #ifdef DEBUG |
| 89 | if (unlikely(flags & ~(KM_SLEEP|KM_NOSLEEP|KM_NOFS|KM_MAYFAIL))) { | 75 | if (unlikely(flags & ~(KM_SLEEP|KM_NOSLEEP|KM_NOFS|KM_MAYFAIL))) { |
| @@ -102,7 +88,7 @@ static __inline gfp_t kmem_flags_convert(unsigned int __nocast flags) | |||
| 102 | if (PFLAGS_TEST_FSTRANS() || (flags & KM_NOFS)) | 88 | if (PFLAGS_TEST_FSTRANS() || (flags & KM_NOFS)) |
| 103 | lflags &= ~__GFP_FS; | 89 | lflags &= ~__GFP_FS; |
| 104 | } | 90 | } |
| 105 | 91 | ||
| 106 | return lflags; | 92 | return lflags; |
| 107 | } | 93 | } |
| 108 | 94 | ||
| @@ -125,13 +111,13 @@ kmem_zone_destroy(kmem_zone_t *zone) | |||
| 125 | BUG(); | 111 | BUG(); |
| 126 | } | 112 | } |
| 127 | 113 | ||
| 128 | extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast); | 114 | extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast); |
| 129 | extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast); | 115 | extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast); |
| 130 | 116 | ||
| 131 | extern void *kmem_alloc(size_t, unsigned int __nocast); | 117 | extern void *kmem_alloc(size_t, unsigned int __nocast); |
| 132 | extern void *kmem_realloc(void *, size_t, size_t, unsigned int __nocast); | 118 | extern void *kmem_realloc(void *, size_t, size_t, unsigned int __nocast); |
| 133 | extern void *kmem_zalloc(size_t, unsigned int __nocast); | 119 | extern void *kmem_zalloc(size_t, unsigned int __nocast); |
| 134 | extern void kmem_free(void *, size_t); | 120 | extern void kmem_free(void *, size_t); |
| 135 | 121 | ||
| 136 | typedef struct shrinker *kmem_shaker_t; | 122 | typedef struct shrinker *kmem_shaker_t; |
| 137 | typedef int (*kmem_shake_func_t)(int, gfp_t); | 123 | typedef int (*kmem_shake_func_t)(int, gfp_t); |
diff --git a/fs/xfs/linux-2.6/mrlock.h b/fs/xfs/linux-2.6/mrlock.h index d2c11a098ff2..16b44c3c2362 100644 --- a/fs/xfs/linux-2.6/mrlock.h +++ b/fs/xfs/linux-2.6/mrlock.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_SUPPORT_MRLOCK_H__ | 18 | #ifndef __XFS_SUPPORT_MRLOCK_H__ |
| 33 | #define __XFS_SUPPORT_MRLOCK_H__ | 19 | #define __XFS_SUPPORT_MRLOCK_H__ |
diff --git a/fs/xfs/linux-2.6/mutex.h b/fs/xfs/linux-2.6/mutex.h index 0b296bb944cb..ce773d89a923 100644 --- a/fs/xfs/linux-2.6/mutex.h +++ b/fs/xfs/linux-2.6/mutex.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_SUPPORT_MUTEX_H__ | 18 | #ifndef __XFS_SUPPORT_MUTEX_H__ |
| 33 | #define __XFS_SUPPORT_MUTEX_H__ | 19 | #define __XFS_SUPPORT_MUTEX_H__ |
diff --git a/fs/xfs/linux-2.6/sema.h b/fs/xfs/linux-2.6/sema.h index 30b67b4e1cbf..194a84490bd1 100644 --- a/fs/xfs/linux-2.6/sema.h +++ b/fs/xfs/linux-2.6/sema.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_SUPPORT_SEMA_H__ | 18 | #ifndef __XFS_SUPPORT_SEMA_H__ |
| 33 | #define __XFS_SUPPORT_SEMA_H__ | 19 | #define __XFS_SUPPORT_SEMA_H__ |
diff --git a/fs/xfs/linux-2.6/spin.h b/fs/xfs/linux-2.6/spin.h index 0039504069a5..50a6191178f4 100644 --- a/fs/xfs/linux-2.6/spin.h +++ b/fs/xfs/linux-2.6/spin.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_SUPPORT_SPIN_H__ | 18 | #ifndef __XFS_SUPPORT_SPIN_H__ |
| 33 | #define __XFS_SUPPORT_SPIN_H__ | 19 | #define __XFS_SUPPORT_SPIN_H__ |
diff --git a/fs/xfs/linux-2.6/sv.h b/fs/xfs/linux-2.6/sv.h index 821d3167e05b..9a8ad481b008 100644 --- a/fs/xfs/linux-2.6/sv.h +++ b/fs/xfs/linux-2.6/sv.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_SUPPORT_SV_H__ | 18 | #ifndef __XFS_SUPPORT_SV_H__ |
| 33 | #define __XFS_SUPPORT_SV_H__ | 19 | #define __XFS_SUPPORT_SV_H__ |
diff --git a/fs/xfs/linux-2.6/time.h b/fs/xfs/linux-2.6/time.h index b0d2873ab274..387e695a184c 100644 --- a/fs/xfs/linux-2.6/time.h +++ b/fs/xfs/linux-2.6/time.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_SUPPORT_TIME_H__ | 18 | #ifndef __XFS_SUPPORT_TIME_H__ |
| 33 | #define __XFS_SUPPORT_TIME_H__ | 19 | #define __XFS_SUPPORT_TIME_H__ |
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 7aa398724706..c6108971b4e6 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
| @@ -1,39 +1,26 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include "xfs.h" | 18 | #include "xfs.h" |
| 34 | #include "xfs_inum.h" | 19 | #include "xfs_bit.h" |
| 35 | #include "xfs_log.h" | 20 | #include "xfs_log.h" |
| 21 | #include "xfs_inum.h" | ||
| 36 | #include "xfs_sb.h" | 22 | #include "xfs_sb.h" |
| 23 | #include "xfs_ag.h" | ||
| 37 | #include "xfs_dir.h" | 24 | #include "xfs_dir.h" |
| 38 | #include "xfs_dir2.h" | 25 | #include "xfs_dir2.h" |
| 39 | #include "xfs_trans.h" | 26 | #include "xfs_trans.h" |
| @@ -42,13 +29,13 @@ | |||
| 42 | #include "xfs_bmap_btree.h" | 29 | #include "xfs_bmap_btree.h" |
| 43 | #include "xfs_alloc_btree.h" | 30 | #include "xfs_alloc_btree.h" |
| 44 | #include "xfs_ialloc_btree.h" | 31 | #include "xfs_ialloc_btree.h" |
| 45 | #include "xfs_alloc.h" | ||
| 46 | #include "xfs_btree.h" | ||
| 47 | #include "xfs_attr_sf.h" | ||
| 48 | #include "xfs_dir_sf.h" | 32 | #include "xfs_dir_sf.h" |
| 49 | #include "xfs_dir2_sf.h" | 33 | #include "xfs_dir2_sf.h" |
| 34 | #include "xfs_attr_sf.h" | ||
| 50 | #include "xfs_dinode.h" | 35 | #include "xfs_dinode.h" |
| 51 | #include "xfs_inode.h" | 36 | #include "xfs_inode.h" |
| 37 | #include "xfs_alloc.h" | ||
| 38 | #include "xfs_btree.h" | ||
| 52 | #include "xfs_error.h" | 39 | #include "xfs_error.h" |
| 53 | #include "xfs_rw.h" | 40 | #include "xfs_rw.h" |
| 54 | #include "xfs_iomap.h" | 41 | #include "xfs_iomap.h" |
| @@ -761,8 +748,9 @@ xfs_page_state_convert( | |||
| 761 | if (page->index >= end_index) { | 748 | if (page->index >= end_index) { |
| 762 | if ((page->index >= end_index + 1) || | 749 | if ((page->index >= end_index + 1) || |
| 763 | !(i_size_read(inode) & (PAGE_CACHE_SIZE - 1))) { | 750 | !(i_size_read(inode) & (PAGE_CACHE_SIZE - 1))) { |
| 764 | err = -EIO; | 751 | if (startio) |
| 765 | goto error; | 752 | unlock_page(page); |
| 753 | return 0; | ||
| 766 | } | 754 | } |
| 767 | } | 755 | } |
| 768 | 756 | ||
| @@ -948,15 +936,18 @@ __linvfs_get_block( | |||
| 948 | { | 936 | { |
| 949 | vnode_t *vp = LINVFS_GET_VP(inode); | 937 | vnode_t *vp = LINVFS_GET_VP(inode); |
| 950 | xfs_iomap_t iomap; | 938 | xfs_iomap_t iomap; |
| 939 | xfs_off_t offset; | ||
| 940 | ssize_t size; | ||
| 951 | int retpbbm = 1; | 941 | int retpbbm = 1; |
| 952 | int error; | 942 | int error; |
| 953 | ssize_t size; | ||
| 954 | loff_t offset = (loff_t)iblock << inode->i_blkbits; | ||
| 955 | 943 | ||
| 956 | if (blocks) | 944 | if (blocks) { |
| 957 | size = blocks << inode->i_blkbits; | 945 | offset = blocks << inode->i_blkbits; /* 64 bit goodness */ |
| 958 | else | 946 | size = (ssize_t) min_t(xfs_off_t, offset, LONG_MAX); |
| 947 | } else { | ||
| 959 | size = 1 << inode->i_blkbits; | 948 | size = 1 << inode->i_blkbits; |
| 949 | } | ||
| 950 | offset = (xfs_off_t)iblock << inode->i_blkbits; | ||
| 960 | 951 | ||
| 961 | VOP_BMAP(vp, offset, size, | 952 | VOP_BMAP(vp, offset, size, |
| 962 | create ? flags : BMAPI_READ, &iomap, &retpbbm, error); | 953 | create ? flags : BMAPI_READ, &iomap, &retpbbm, error); |
| @@ -967,8 +958,8 @@ __linvfs_get_block( | |||
| 967 | return 0; | 958 | return 0; |
| 968 | 959 | ||
| 969 | if (iomap.iomap_bn != IOMAP_DADDR_NULL) { | 960 | if (iomap.iomap_bn != IOMAP_DADDR_NULL) { |
| 970 | xfs_daddr_t bn; | 961 | xfs_daddr_t bn; |
| 971 | loff_t delta; | 962 | xfs_off_t delta; |
| 972 | 963 | ||
| 973 | /* For unwritten extents do not report a disk address on | 964 | /* For unwritten extents do not report a disk address on |
| 974 | * the read case (treat as if we're reading into a hole). | 965 | * the read case (treat as if we're reading into a hole). |
| @@ -1000,9 +991,8 @@ __linvfs_get_block( | |||
| 1000 | */ | 991 | */ |
| 1001 | if (create && | 992 | if (create && |
| 1002 | ((!buffer_mapped(bh_result) && !buffer_uptodate(bh_result)) || | 993 | ((!buffer_mapped(bh_result) && !buffer_uptodate(bh_result)) || |
| 1003 | (offset >= i_size_read(inode)) || (iomap.iomap_flags & IOMAP_NEW))) { | 994 | (offset >= i_size_read(inode)) || (iomap.iomap_flags & IOMAP_NEW))) |
| 1004 | set_buffer_new(bh_result); | 995 | set_buffer_new(bh_result); |
| 1005 | } | ||
| 1006 | 996 | ||
| 1007 | if (iomap.iomap_flags & IOMAP_DELAY) { | 997 | if (iomap.iomap_flags & IOMAP_DELAY) { |
| 1008 | BUG_ON(direct); | 998 | BUG_ON(direct); |
| @@ -1014,9 +1004,11 @@ __linvfs_get_block( | |||
| 1014 | } | 1004 | } |
| 1015 | 1005 | ||
| 1016 | if (blocks) { | 1006 | if (blocks) { |
| 1017 | bh_result->b_size = (ssize_t)min( | 1007 | ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0); |
| 1018 | (loff_t)(iomap.iomap_bsize - iomap.iomap_delta), | 1008 | offset = min_t(xfs_off_t, |
| 1019 | (loff_t)(blocks << inode->i_blkbits)); | 1009 | iomap.iomap_bsize - iomap.iomap_delta, |
| 1010 | blocks << inode->i_blkbits); | ||
| 1011 | bh_result->b_size = (u32) min_t(xfs_off_t, UINT_MAX, offset); | ||
| 1020 | } | 1012 | } |
| 1021 | 1013 | ||
| 1022 | return 0; | 1014 | return 0; |
diff --git a/fs/xfs/linux-2.6/xfs_aops.h b/fs/xfs/linux-2.6/xfs_aops.h index 2fa62974a04d..4720758a9ade 100644 --- a/fs/xfs/linux-2.6/xfs_aops.h +++ b/fs/xfs/linux-2.6/xfs_aops.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_AOPS_H__ | 18 | #ifndef __XFS_AOPS_H__ |
| 33 | #define __XFS_AOPS_H__ | 19 | #define __XFS_AOPS_H__ |
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 4cd46abe8434..6fe21d2b8847 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
| @@ -1,46 +1,20 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * | 12 | * GNU General Public License for more details. |
| 12 | * Further, this software is distributed without any warranty that it is | ||
| 13 | * free of the rightful claim of any third person regarding infringement | ||
| 14 | * or the like. Any license provided herein, whether implied or | ||
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | ||
| 32 | |||
| 33 | /* | ||
| 34 | * The xfs_buf.c code provides an abstract buffer cache model on top | ||
| 35 | * of the Linux page cache. Cached metadata blocks for a file system | ||
| 36 | * are hashed to the inode for the block device. xfs_buf.c assembles | ||
| 37 | * buffers (xfs_buf_t) on demand to aggregate such cached pages for I/O. | ||
| 38 | * | ||
| 39 | * Written by Steve Lord, Jim Mostek, Russell Cattelan | ||
| 40 | * and Rajagopal Ananthanarayanan ("ananth") at SGI. | ||
| 41 | * | 13 | * |
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write the Free Software Foundation, | ||
| 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 42 | */ | 17 | */ |
| 43 | |||
| 44 | #include <linux/stddef.h> | 18 | #include <linux/stddef.h> |
| 45 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
| 46 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
| @@ -55,13 +29,8 @@ | |||
| 55 | #include <linux/blkdev.h> | 29 | #include <linux/blkdev.h> |
| 56 | #include <linux/hash.h> | 30 | #include <linux/hash.h> |
| 57 | #include <linux/kthread.h> | 31 | #include <linux/kthread.h> |
| 58 | |||
| 59 | #include "xfs_linux.h" | 32 | #include "xfs_linux.h" |
| 60 | 33 | ||
| 61 | /* | ||
| 62 | * File wide globals | ||
| 63 | */ | ||
| 64 | |||
| 65 | STATIC kmem_cache_t *pagebuf_zone; | 34 | STATIC kmem_cache_t *pagebuf_zone; |
| 66 | STATIC kmem_shaker_t pagebuf_shake; | 35 | STATIC kmem_shaker_t pagebuf_shake; |
| 67 | STATIC int xfsbufd_wakeup(int, gfp_t); | 36 | STATIC int xfsbufd_wakeup(int, gfp_t); |
| @@ -70,10 +39,6 @@ STATIC void pagebuf_delwri_queue(xfs_buf_t *, int); | |||
| 70 | STATIC struct workqueue_struct *xfslogd_workqueue; | 39 | STATIC struct workqueue_struct *xfslogd_workqueue; |
| 71 | struct workqueue_struct *xfsdatad_workqueue; | 40 | struct workqueue_struct *xfsdatad_workqueue; |
| 72 | 41 | ||
| 73 | /* | ||
| 74 | * Pagebuf debugging | ||
| 75 | */ | ||
| 76 | |||
| 77 | #ifdef PAGEBUF_TRACE | 42 | #ifdef PAGEBUF_TRACE |
| 78 | void | 43 | void |
| 79 | pagebuf_trace( | 44 | pagebuf_trace( |
| @@ -112,10 +77,6 @@ ktrace_t *pagebuf_trace_buf; | |||
| 112 | # define PB_GET_OWNER(pb) do { } while (0) | 77 | # define PB_GET_OWNER(pb) do { } while (0) |
| 113 | #endif | 78 | #endif |
| 114 | 79 | ||
| 115 | /* | ||
| 116 | * Pagebuf allocation / freeing. | ||
| 117 | */ | ||
| 118 | |||
| 119 | #define pb_to_gfp(flags) \ | 80 | #define pb_to_gfp(flags) \ |
| 120 | ((((flags) & PBF_READ_AHEAD) ? __GFP_NORETRY : \ | 81 | ((((flags) & PBF_READ_AHEAD) ? __GFP_NORETRY : \ |
| 121 | ((flags) & PBF_DONT_BLOCK) ? GFP_NOFS : GFP_KERNEL) | __GFP_NOWARN) | 82 | ((flags) & PBF_DONT_BLOCK) ? GFP_NOFS : GFP_KERNEL) | __GFP_NOWARN) |
| @@ -123,7 +84,6 @@ ktrace_t *pagebuf_trace_buf; | |||
| 123 | #define pb_to_km(flags) \ | 84 | #define pb_to_km(flags) \ |
| 124 | (((flags) & PBF_DONT_BLOCK) ? KM_NOFS : KM_SLEEP) | 85 | (((flags) & PBF_DONT_BLOCK) ? KM_NOFS : KM_SLEEP) |
| 125 | 86 | ||
| 126 | |||
| 127 | #define pagebuf_allocate(flags) \ | 87 | #define pagebuf_allocate(flags) \ |
| 128 | kmem_zone_alloc(pagebuf_zone, pb_to_km(flags)) | 88 | kmem_zone_alloc(pagebuf_zone, pb_to_km(flags)) |
| 129 | #define pagebuf_deallocate(pb) \ | 89 | #define pagebuf_deallocate(pb) \ |
| @@ -286,7 +246,7 @@ _pagebuf_initialize( | |||
| 286 | * most cases but may be reset (e.g. XFS recovery). | 246 | * most cases but may be reset (e.g. XFS recovery). |
| 287 | */ | 247 | */ |
| 288 | pb->pb_buffer_length = pb->pb_count_desired = range_length; | 248 | pb->pb_buffer_length = pb->pb_count_desired = range_length; |
| 289 | pb->pb_flags = flags | PBF_NONE; | 249 | pb->pb_flags = flags; |
| 290 | pb->pb_bn = XFS_BUF_DADDR_NULL; | 250 | pb->pb_bn = XFS_BUF_DADDR_NULL; |
| 291 | atomic_set(&pb->pb_pin_count, 0); | 251 | atomic_set(&pb->pb_pin_count, 0); |
| 292 | init_waitqueue_head(&pb->pb_waiters); | 252 | init_waitqueue_head(&pb->pb_waiters); |
| @@ -458,14 +418,8 @@ _pagebuf_lookup_pages( | |||
| 458 | unlock_page(bp->pb_pages[i]); | 418 | unlock_page(bp->pb_pages[i]); |
| 459 | } | 419 | } |
| 460 | 420 | ||
| 461 | if (page_count) { | 421 | if (page_count == bp->pb_page_count) |
| 462 | /* if we have any uptodate pages, mark that in the buffer */ | 422 | bp->pb_flags |= PBF_DONE; |
| 463 | bp->pb_flags &= ~PBF_NONE; | ||
| 464 | |||
| 465 | /* if some pages aren't uptodate, mark that in the buffer */ | ||
| 466 | if (page_count != bp->pb_page_count) | ||
| 467 | bp->pb_flags |= PBF_PARTIAL; | ||
| 468 | } | ||
| 469 | 423 | ||
| 470 | PB_TRACE(bp, "lookup_pages", (long)page_count); | 424 | PB_TRACE(bp, "lookup_pages", (long)page_count); |
| 471 | return error; | 425 | return error; |
| @@ -676,7 +630,7 @@ xfs_buf_read_flags( | |||
| 676 | 630 | ||
| 677 | pb = xfs_buf_get_flags(target, ioff, isize, flags); | 631 | pb = xfs_buf_get_flags(target, ioff, isize, flags); |
| 678 | if (pb) { | 632 | if (pb) { |
| 679 | if (PBF_NOT_DONE(pb)) { | 633 | if (!XFS_BUF_ISDONE(pb)) { |
| 680 | PB_TRACE(pb, "read", (unsigned long)flags); | 634 | PB_TRACE(pb, "read", (unsigned long)flags); |
| 681 | XFS_STATS_INC(pb_get_read); | 635 | XFS_STATS_INC(pb_get_read); |
| 682 | pagebuf_iostart(pb, flags); | 636 | pagebuf_iostart(pb, flags); |
| @@ -813,7 +767,7 @@ pagebuf_get_no_daddr( | |||
| 813 | bp = pagebuf_allocate(0); | 767 | bp = pagebuf_allocate(0); |
| 814 | if (unlikely(bp == NULL)) | 768 | if (unlikely(bp == NULL)) |
| 815 | goto fail; | 769 | goto fail; |
| 816 | _pagebuf_initialize(bp, target, 0, len, PBF_FORCEIO); | 770 | _pagebuf_initialize(bp, target, 0, len, 0); |
| 817 | 771 | ||
| 818 | try_again: | 772 | try_again: |
| 819 | data = kmem_alloc(malloc_len, KM_SLEEP | KM_MAYFAIL); | 773 | data = kmem_alloc(malloc_len, KM_SLEEP | KM_MAYFAIL); |
| @@ -876,39 +830,18 @@ pagebuf_rele( | |||
| 876 | 830 | ||
| 877 | PB_TRACE(pb, "rele", pb->pb_relse); | 831 | PB_TRACE(pb, "rele", pb->pb_relse); |
| 878 | 832 | ||
| 879 | /* | ||
| 880 | * pagebuf_lookup buffers are not hashed, not delayed write, | ||
| 881 | * and don't have their own release routines. Special case. | ||
| 882 | */ | ||
| 883 | if (unlikely(!hash)) { | ||
| 884 | ASSERT(!pb->pb_relse); | ||
| 885 | if (atomic_dec_and_test(&pb->pb_hold)) | ||
| 886 | xfs_buf_free(pb); | ||
| 887 | return; | ||
| 888 | } | ||
| 889 | |||
| 890 | if (atomic_dec_and_lock(&pb->pb_hold, &hash->bh_lock)) { | 833 | if (atomic_dec_and_lock(&pb->pb_hold, &hash->bh_lock)) { |
| 891 | int do_free = 1; | ||
| 892 | |||
| 893 | if (pb->pb_relse) { | 834 | if (pb->pb_relse) { |
| 894 | atomic_inc(&pb->pb_hold); | 835 | atomic_inc(&pb->pb_hold); |
| 895 | spin_unlock(&hash->bh_lock); | 836 | spin_unlock(&hash->bh_lock); |
| 896 | (*(pb->pb_relse)) (pb); | 837 | (*(pb->pb_relse)) (pb); |
| 897 | spin_lock(&hash->bh_lock); | 838 | } else if (pb->pb_flags & PBF_FS_MANAGED) { |
| 898 | do_free = 0; | ||
| 899 | } | ||
| 900 | |||
| 901 | if (pb->pb_flags & PBF_FS_MANAGED) { | ||
| 902 | do_free = 0; | ||
| 903 | } | ||
| 904 | |||
| 905 | if (do_free) { | ||
| 906 | ASSERT((pb->pb_flags & (PBF_DELWRI|_PBF_DELWRI_Q)) == 0); | ||
| 907 | list_del_init(&pb->pb_hash_list); | ||
| 908 | spin_unlock(&hash->bh_lock); | 839 | spin_unlock(&hash->bh_lock); |
| 909 | pagebuf_free(pb); | ||
| 910 | } else { | 840 | } else { |
| 841 | ASSERT(!(pb->pb_flags & (PBF_DELWRI|_PBF_DELWRI_Q))); | ||
| 842 | list_del_init(&pb->pb_hash_list); | ||
| 911 | spin_unlock(&hash->bh_lock); | 843 | spin_unlock(&hash->bh_lock); |
| 844 | pagebuf_free(pb); | ||
| 912 | } | 845 | } |
| 913 | } else { | 846 | } else { |
| 914 | /* | 847 | /* |
| @@ -1121,21 +1054,18 @@ pagebuf_iodone_work( | |||
| 1121 | void | 1054 | void |
| 1122 | pagebuf_iodone( | 1055 | pagebuf_iodone( |
| 1123 | xfs_buf_t *pb, | 1056 | xfs_buf_t *pb, |
| 1124 | int dataio, | ||
| 1125 | int schedule) | 1057 | int schedule) |
| 1126 | { | 1058 | { |
| 1127 | pb->pb_flags &= ~(PBF_READ | PBF_WRITE); | 1059 | pb->pb_flags &= ~(PBF_READ | PBF_WRITE); |
| 1128 | if (pb->pb_error == 0) { | 1060 | if (pb->pb_error == 0) |
| 1129 | pb->pb_flags &= ~(PBF_PARTIAL | PBF_NONE); | 1061 | pb->pb_flags |= PBF_DONE; |
| 1130 | } | ||
| 1131 | 1062 | ||
| 1132 | PB_TRACE(pb, "iodone", pb->pb_iodone); | 1063 | PB_TRACE(pb, "iodone", pb->pb_iodone); |
| 1133 | 1064 | ||
| 1134 | if ((pb->pb_iodone) || (pb->pb_flags & PBF_ASYNC)) { | 1065 | if ((pb->pb_iodone) || (pb->pb_flags & PBF_ASYNC)) { |
| 1135 | if (schedule) { | 1066 | if (schedule) { |
| 1136 | INIT_WORK(&pb->pb_iodone_work, pagebuf_iodone_work, pb); | 1067 | INIT_WORK(&pb->pb_iodone_work, pagebuf_iodone_work, pb); |
| 1137 | queue_work(dataio ? xfsdatad_workqueue : | 1068 | queue_work(xfslogd_workqueue, &pb->pb_iodone_work); |
| 1138 | xfslogd_workqueue, &pb->pb_iodone_work); | ||
| 1139 | } else { | 1069 | } else { |
| 1140 | pagebuf_iodone_work(pb); | 1070 | pagebuf_iodone_work(pb); |
| 1141 | } | 1071 | } |
| @@ -1235,7 +1165,7 @@ _pagebuf_iodone( | |||
| 1235 | { | 1165 | { |
| 1236 | if (atomic_dec_and_test(&pb->pb_io_remaining) == 1) { | 1166 | if (atomic_dec_and_test(&pb->pb_io_remaining) == 1) { |
| 1237 | pb->pb_locked = 0; | 1167 | pb->pb_locked = 0; |
| 1238 | pagebuf_iodone(pb, (pb->pb_flags & PBF_FS_DATAIOD), schedule); | 1168 | pagebuf_iodone(pb, schedule); |
| 1239 | } | 1169 | } |
| 1240 | } | 1170 | } |
| 1241 | 1171 | ||
| @@ -1304,6 +1234,11 @@ _pagebuf_ioapply( | |||
| 1304 | rw = (pb->pb_flags & PBF_READ) ? READ : WRITE; | 1234 | rw = (pb->pb_flags & PBF_READ) ? READ : WRITE; |
| 1305 | } | 1235 | } |
| 1306 | 1236 | ||
| 1237 | if (pb->pb_flags & PBF_ORDERED) { | ||
| 1238 | ASSERT(!(pb->pb_flags & PBF_READ)); | ||
| 1239 | rw = WRITE_BARRIER; | ||
| 1240 | } | ||
| 1241 | |||
| 1307 | /* Special code path for reading a sub page size pagebuf in -- | 1242 | /* Special code path for reading a sub page size pagebuf in -- |
| 1308 | * we populate up the whole page, and hence the other metadata | 1243 | * we populate up the whole page, and hence the other metadata |
| 1309 | * in the same page. This optimization is only valid when the | 1244 | * in the same page. This optimization is only valid when the |
| @@ -1750,8 +1685,8 @@ STATIC int xfsbufd_force_sleep; | |||
| 1750 | 1685 | ||
| 1751 | STATIC int | 1686 | STATIC int |
| 1752 | xfsbufd_wakeup( | 1687 | xfsbufd_wakeup( |
| 1753 | int priority, | 1688 | int priority, |
| 1754 | gfp_t mask) | 1689 | gfp_t mask) |
| 1755 | { | 1690 | { |
| 1756 | if (xfsbufd_force_sleep) | 1691 | if (xfsbufd_force_sleep) |
| 1757 | return 0; | 1692 | return 0; |
| @@ -1781,8 +1716,8 @@ xfsbufd( | |||
| 1781 | xfsbufd_force_sleep = 0; | 1716 | xfsbufd_force_sleep = 0; |
| 1782 | } | 1717 | } |
| 1783 | 1718 | ||
| 1784 | schedule_timeout_interruptible | 1719 | schedule_timeout_interruptible( |
| 1785 | (xfs_buf_timer_centisecs * msecs_to_jiffies(10)); | 1720 | xfs_buf_timer_centisecs * msecs_to_jiffies(10)); |
| 1786 | 1721 | ||
| 1787 | age = xfs_buf_age_centisecs * msecs_to_jiffies(10); | 1722 | age = xfs_buf_age_centisecs * msecs_to_jiffies(10); |
| 1788 | spin_lock(&pbd_delwrite_lock); | 1723 | spin_lock(&pbd_delwrite_lock); |
| @@ -1891,14 +1826,22 @@ xfs_flush_buftarg( | |||
| 1891 | return pincount; | 1826 | return pincount; |
| 1892 | } | 1827 | } |
| 1893 | 1828 | ||
| 1894 | STATIC int | 1829 | int __init |
| 1895 | xfs_buf_daemons_start(void) | 1830 | pagebuf_init(void) |
| 1896 | { | 1831 | { |
| 1897 | int error = -ENOMEM; | 1832 | int error = -ENOMEM; |
| 1898 | 1833 | ||
| 1834 | #ifdef PAGEBUF_TRACE | ||
| 1835 | pagebuf_trace_buf = ktrace_alloc(PAGEBUF_TRACE_SIZE, KM_SLEEP); | ||
| 1836 | #endif | ||
| 1837 | |||
| 1838 | pagebuf_zone = kmem_zone_init(sizeof(xfs_buf_t), "xfs_buf"); | ||
| 1839 | if (!pagebuf_zone) | ||
| 1840 | goto out_free_trace_buf; | ||
| 1841 | |||
| 1899 | xfslogd_workqueue = create_workqueue("xfslogd"); | 1842 | xfslogd_workqueue = create_workqueue("xfslogd"); |
| 1900 | if (!xfslogd_workqueue) | 1843 | if (!xfslogd_workqueue) |
| 1901 | goto out; | 1844 | goto out_free_buf_zone; |
| 1902 | 1845 | ||
| 1903 | xfsdatad_workqueue = create_workqueue("xfsdatad"); | 1846 | xfsdatad_workqueue = create_workqueue("xfsdatad"); |
| 1904 | if (!xfsdatad_workqueue) | 1847 | if (!xfsdatad_workqueue) |
| @@ -1909,82 +1852,37 @@ xfs_buf_daemons_start(void) | |||
| 1909 | error = PTR_ERR(xfsbufd_task); | 1852 | error = PTR_ERR(xfsbufd_task); |
| 1910 | goto out_destroy_xfsdatad_workqueue; | 1853 | goto out_destroy_xfsdatad_workqueue; |
| 1911 | } | 1854 | } |
| 1855 | |||
| 1856 | pagebuf_shake = kmem_shake_register(xfsbufd_wakeup); | ||
| 1857 | if (!pagebuf_shake) | ||
| 1858 | goto out_stop_xfsbufd; | ||
| 1859 | |||
| 1912 | return 0; | 1860 | return 0; |
| 1913 | 1861 | ||
| 1862 | out_stop_xfsbufd: | ||
| 1863 | kthread_stop(xfsbufd_task); | ||
| 1914 | out_destroy_xfsdatad_workqueue: | 1864 | out_destroy_xfsdatad_workqueue: |
| 1915 | destroy_workqueue(xfsdatad_workqueue); | 1865 | destroy_workqueue(xfsdatad_workqueue); |
| 1916 | out_destroy_xfslogd_workqueue: | 1866 | out_destroy_xfslogd_workqueue: |
| 1917 | destroy_workqueue(xfslogd_workqueue); | 1867 | destroy_workqueue(xfslogd_workqueue); |
| 1918 | out: | ||
| 1919 | return error; | ||
| 1920 | } | ||
| 1921 | |||
| 1922 | /* | ||
| 1923 | * Note: do not mark as __exit, it is called from pagebuf_terminate. | ||
| 1924 | */ | ||
| 1925 | STATIC void | ||
| 1926 | xfs_buf_daemons_stop(void) | ||
| 1927 | { | ||
| 1928 | kthread_stop(xfsbufd_task); | ||
| 1929 | destroy_workqueue(xfslogd_workqueue); | ||
| 1930 | destroy_workqueue(xfsdatad_workqueue); | ||
| 1931 | } | ||
| 1932 | |||
| 1933 | /* | ||
| 1934 | * Initialization and Termination | ||
| 1935 | */ | ||
| 1936 | |||
| 1937 | int __init | ||
| 1938 | pagebuf_init(void) | ||
| 1939 | { | ||
| 1940 | int error = -ENOMEM; | ||
| 1941 | |||
| 1942 | pagebuf_zone = kmem_zone_init(sizeof(xfs_buf_t), "xfs_buf"); | ||
| 1943 | if (!pagebuf_zone) | ||
| 1944 | goto out; | ||
| 1945 | |||
| 1946 | #ifdef PAGEBUF_TRACE | ||
| 1947 | pagebuf_trace_buf = ktrace_alloc(PAGEBUF_TRACE_SIZE, KM_SLEEP); | ||
| 1948 | #endif | ||
| 1949 | |||
| 1950 | error = xfs_buf_daemons_start(); | ||
| 1951 | if (error) | ||
| 1952 | goto out_free_buf_zone; | ||
| 1953 | |||
| 1954 | pagebuf_shake = kmem_shake_register(xfsbufd_wakeup); | ||
| 1955 | if (!pagebuf_shake) { | ||
| 1956 | error = -ENOMEM; | ||
| 1957 | goto out_stop_daemons; | ||
| 1958 | } | ||
| 1959 | |||
| 1960 | return 0; | ||
| 1961 | |||
| 1962 | out_stop_daemons: | ||
| 1963 | xfs_buf_daemons_stop(); | ||
| 1964 | out_free_buf_zone: | 1868 | out_free_buf_zone: |
| 1869 | kmem_zone_destroy(pagebuf_zone); | ||
| 1870 | out_free_trace_buf: | ||
| 1965 | #ifdef PAGEBUF_TRACE | 1871 | #ifdef PAGEBUF_TRACE |
| 1966 | ktrace_free(pagebuf_trace_buf); | 1872 | ktrace_free(pagebuf_trace_buf); |
| 1967 | #endif | 1873 | #endif |
| 1968 | kmem_zone_destroy(pagebuf_zone); | ||
| 1969 | out: | ||
| 1970 | return error; | 1874 | return error; |
| 1971 | } | 1875 | } |
| 1972 | 1876 | ||
| 1973 | |||
| 1974 | /* | ||
| 1975 | * pagebuf_terminate. | ||
| 1976 | * | ||
| 1977 | * Note: do not mark as __exit, this is also called from the __init code. | ||
| 1978 | */ | ||
| 1979 | void | 1877 | void |
| 1980 | pagebuf_terminate(void) | 1878 | pagebuf_terminate(void) |
| 1981 | { | 1879 | { |
| 1982 | xfs_buf_daemons_stop(); | 1880 | kmem_shake_deregister(pagebuf_shake); |
| 1983 | 1881 | kthread_stop(xfsbufd_task); | |
| 1882 | destroy_workqueue(xfsdatad_workqueue); | ||
| 1883 | destroy_workqueue(xfslogd_workqueue); | ||
| 1884 | kmem_zone_destroy(pagebuf_zone); | ||
| 1984 | #ifdef PAGEBUF_TRACE | 1885 | #ifdef PAGEBUF_TRACE |
| 1985 | ktrace_free(pagebuf_trace_buf); | 1886 | ktrace_free(pagebuf_trace_buf); |
| 1986 | #endif | 1887 | #endif |
| 1987 | |||
| 1988 | kmem_zone_destroy(pagebuf_zone); | ||
| 1989 | kmem_shake_deregister(pagebuf_shake); | ||
| 1990 | } | 1888 | } |
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 67c19f799232..237a35b915d1 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h | |||
| @@ -1,39 +1,20 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | /* | ||
| 34 | * Written by Steve Lord, Jim Mostek, Russell Cattelan at SGI | ||
| 35 | */ | ||
| 36 | |||
| 37 | #ifndef __XFS_BUF_H__ | 18 | #ifndef __XFS_BUF_H__ |
| 38 | #define __XFS_BUF_H__ | 19 | #define __XFS_BUF_H__ |
| 39 | 20 | ||
| @@ -69,15 +50,12 @@ typedef enum page_buf_flags_e { /* pb_flags values */ | |||
| 69 | PBF_READ = (1 << 0), /* buffer intended for reading from device */ | 50 | PBF_READ = (1 << 0), /* buffer intended for reading from device */ |
| 70 | PBF_WRITE = (1 << 1), /* buffer intended for writing to device */ | 51 | PBF_WRITE = (1 << 1), /* buffer intended for writing to device */ |
| 71 | PBF_MAPPED = (1 << 2), /* buffer mapped (pb_addr valid) */ | 52 | PBF_MAPPED = (1 << 2), /* buffer mapped (pb_addr valid) */ |
| 72 | PBF_PARTIAL = (1 << 3), /* buffer partially read */ | ||
| 73 | PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */ | 53 | PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */ |
| 74 | PBF_NONE = (1 << 5), /* buffer not read at all */ | 54 | PBF_DONE = (1 << 5), /* all pages in the buffer uptodate */ |
| 75 | PBF_DELWRI = (1 << 6), /* buffer has dirty pages */ | 55 | PBF_DELWRI = (1 << 6), /* buffer has dirty pages */ |
| 76 | PBF_STALE = (1 << 7), /* buffer has been staled, do not find it */ | 56 | PBF_STALE = (1 << 7), /* buffer has been staled, do not find it */ |
| 77 | PBF_FS_MANAGED = (1 << 8), /* filesystem controls freeing memory */ | 57 | PBF_FS_MANAGED = (1 << 8), /* filesystem controls freeing memory */ |
| 78 | PBF_FS_DATAIOD = (1 << 9), /* schedule IO completion on fs datad */ | 58 | PBF_ORDERED = (1 << 11), /* use ordered writes */ |
| 79 | PBF_FORCEIO = (1 << 10), /* ignore any cache state */ | ||
| 80 | PBF_FLUSH = (1 << 11), /* flush disk write cache */ | ||
| 81 | PBF_READ_AHEAD = (1 << 12), /* asynchronous read-ahead */ | 59 | PBF_READ_AHEAD = (1 << 12), /* asynchronous read-ahead */ |
| 82 | 60 | ||
| 83 | /* flags used only as arguments to access routines */ | 61 | /* flags used only as arguments to access routines */ |
| @@ -92,9 +70,6 @@ typedef enum page_buf_flags_e { /* pb_flags values */ | |||
| 92 | _PBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */ | 70 | _PBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */ |
| 93 | } page_buf_flags_t; | 71 | } page_buf_flags_t; |
| 94 | 72 | ||
| 95 | #define PBF_UPDATE (PBF_READ | PBF_WRITE) | ||
| 96 | #define PBF_NOT_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) != 0) | ||
| 97 | #define PBF_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) == 0) | ||
| 98 | 73 | ||
| 99 | typedef struct xfs_bufhash { | 74 | typedef struct xfs_bufhash { |
| 100 | struct list_head bh_list; | 75 | struct list_head bh_list; |
| @@ -258,7 +233,6 @@ extern void pagebuf_unlock( /* unlock buffer */ | |||
| 258 | 233 | ||
| 259 | extern void pagebuf_iodone( /* mark buffer I/O complete */ | 234 | extern void pagebuf_iodone( /* mark buffer I/O complete */ |
| 260 | xfs_buf_t *, /* buffer to mark */ | 235 | xfs_buf_t *, /* buffer to mark */ |
| 261 | int, /* use data/log helper thread. */ | ||
| 262 | int); /* run completion locally, or in | 236 | int); /* run completion locally, or in |
| 263 | * a helper thread. */ | 237 | * a helper thread. */ |
| 264 | 238 | ||
| @@ -378,21 +352,21 @@ extern void pagebuf_trace( | |||
| 378 | #define XFS_BUF_GETERROR(x) pagebuf_geterror(x) | 352 | #define XFS_BUF_GETERROR(x) pagebuf_geterror(x) |
| 379 | #define XFS_BUF_ISERROR(x) (pagebuf_geterror(x)?1:0) | 353 | #define XFS_BUF_ISERROR(x) (pagebuf_geterror(x)?1:0) |
| 380 | 354 | ||
| 381 | #define XFS_BUF_DONE(x) ((x)->pb_flags &= ~(PBF_PARTIAL|PBF_NONE)) | 355 | #define XFS_BUF_DONE(x) ((x)->pb_flags |= PBF_DONE) |
| 382 | #define XFS_BUF_UNDONE(x) ((x)->pb_flags |= PBF_PARTIAL|PBF_NONE) | 356 | #define XFS_BUF_UNDONE(x) ((x)->pb_flags &= ~PBF_DONE) |
| 383 | #define XFS_BUF_ISDONE(x) (!(PBF_NOT_DONE(x))) | 357 | #define XFS_BUF_ISDONE(x) ((x)->pb_flags & PBF_DONE) |
| 384 | 358 | ||
| 385 | #define XFS_BUF_BUSY(x) ((x)->pb_flags |= PBF_FORCEIO) | 359 | #define XFS_BUF_BUSY(x) do { } while (0) |
| 386 | #define XFS_BUF_UNBUSY(x) ((x)->pb_flags &= ~PBF_FORCEIO) | 360 | #define XFS_BUF_UNBUSY(x) do { } while (0) |
| 387 | #define XFS_BUF_ISBUSY(x) (1) | 361 | #define XFS_BUF_ISBUSY(x) (1) |
| 388 | 362 | ||
| 389 | #define XFS_BUF_ASYNC(x) ((x)->pb_flags |= PBF_ASYNC) | 363 | #define XFS_BUF_ASYNC(x) ((x)->pb_flags |= PBF_ASYNC) |
| 390 | #define XFS_BUF_UNASYNC(x) ((x)->pb_flags &= ~PBF_ASYNC) | 364 | #define XFS_BUF_UNASYNC(x) ((x)->pb_flags &= ~PBF_ASYNC) |
| 391 | #define XFS_BUF_ISASYNC(x) ((x)->pb_flags & PBF_ASYNC) | 365 | #define XFS_BUF_ISASYNC(x) ((x)->pb_flags & PBF_ASYNC) |
| 392 | 366 | ||
| 393 | #define XFS_BUF_FLUSH(x) ((x)->pb_flags |= PBF_FLUSH) | 367 | #define XFS_BUF_ORDERED(x) ((x)->pb_flags |= PBF_ORDERED) |
| 394 | #define XFS_BUF_UNFLUSH(x) ((x)->pb_flags &= ~PBF_FLUSH) | 368 | #define XFS_BUF_UNORDERED(x) ((x)->pb_flags &= ~PBF_ORDERED) |
| 395 | #define XFS_BUF_ISFLUSH(x) ((x)->pb_flags & PBF_FLUSH) | 369 | #define XFS_BUF_ISORDERED(x) ((x)->pb_flags & PBF_ORDERED) |
| 396 | 370 | ||
| 397 | #define XFS_BUF_SHUT(x) printk("XFS_BUF_SHUT not implemented yet\n") | 371 | #define XFS_BUF_SHUT(x) printk("XFS_BUF_SHUT not implemented yet\n") |
| 398 | #define XFS_BUF_UNSHUT(x) printk("XFS_BUF_UNSHUT not implemented yet\n") | 372 | #define XFS_BUF_UNSHUT(x) printk("XFS_BUF_UNSHUT not implemented yet\n") |
| @@ -412,9 +386,6 @@ extern void pagebuf_trace( | |||
| 412 | 386 | ||
| 413 | #define XFS_BUF_BP_ISMAPPED(bp) 1 | 387 | #define XFS_BUF_BP_ISMAPPED(bp) 1 |
| 414 | 388 | ||
| 415 | #define XFS_BUF_DATAIO(x) ((x)->pb_flags |= PBF_FS_DATAIOD) | ||
| 416 | #define XFS_BUF_UNDATAIO(x) ((x)->pb_flags &= ~PBF_FS_DATAIOD) | ||
| 417 | |||
| 418 | #define XFS_BUF_IODONE_FUNC(buf) (buf)->pb_iodone | 389 | #define XFS_BUF_IODONE_FUNC(buf) (buf)->pb_iodone |
| 419 | #define XFS_BUF_SET_IODONE_FUNC(buf, func) \ | 390 | #define XFS_BUF_SET_IODONE_FUNC(buf, func) \ |
| 420 | (buf)->pb_iodone = (func) | 391 | (buf)->pb_iodone = (func) |
| @@ -510,7 +481,7 @@ static inline void xfs_buf_relse(xfs_buf_t *bp) | |||
| 510 | pagebuf_trace(bp, id, NULL, (void *)__builtin_return_address(0)) | 481 | pagebuf_trace(bp, id, NULL, (void *)__builtin_return_address(0)) |
| 511 | 482 | ||
| 512 | #define xfs_biodone(pb) \ | 483 | #define xfs_biodone(pb) \ |
| 513 | pagebuf_iodone(pb, (pb->pb_flags & PBF_FS_DATAIOD), 0) | 484 | pagebuf_iodone(pb, 0) |
| 514 | 485 | ||
| 515 | #define xfs_biomove(pb, off, len, data, rw) \ | 486 | #define xfs_biomove(pb, off, len, data, rw) \ |
| 516 | pagebuf_iomove((pb), (off), (len), (data), \ | 487 | pagebuf_iomove((pb), (off), (len), (data), \ |
diff --git a/fs/xfs/linux-2.6/xfs_cred.h b/fs/xfs/linux-2.6/xfs_cred.h index 00c45849d41a..4af491024727 100644 --- a/fs/xfs/linux-2.6/xfs_cred.h +++ b/fs/xfs/linux-2.6/xfs_cred.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_CRED_H__ | 18 | #ifndef __XFS_CRED_H__ |
| 33 | #define __XFS_CRED_H__ | 19 | #define __XFS_CRED_H__ |
diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c index f372a1a5e168..80eb249f2fa0 100644 --- a/fs/xfs/linux-2.6/xfs_export.c +++ b/fs/xfs/linux-2.6/xfs_export.c | |||
| @@ -1,35 +1,20 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2004-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include "xfs.h" | 18 | #include "xfs.h" |
| 34 | #include "xfs_types.h" | 19 | #include "xfs_types.h" |
| 35 | #include "xfs_dmapi.h" | 20 | #include "xfs_dmapi.h" |
| @@ -41,7 +26,7 @@ | |||
| 41 | #include "xfs_export.h" | 26 | #include "xfs_export.h" |
| 42 | 27 | ||
| 43 | /* | 28 | /* |
| 44 | * XFS encode and decodes the fileid portion of NFS filehandles | 29 | * XFS encodes and decodes the fileid portion of NFS filehandles |
| 45 | * itself instead of letting the generic NFS code do it. This | 30 | * itself instead of letting the generic NFS code do it. This |
| 46 | * allows filesystems with 64 bit inode numbers to be exported. | 31 | * allows filesystems with 64 bit inode numbers to be exported. |
| 47 | * | 32 | * |
| @@ -51,7 +36,6 @@ | |||
| 51 | * remains in that code. | 36 | * remains in that code. |
| 52 | */ | 37 | */ |
| 53 | 38 | ||
| 54 | |||
| 55 | STATIC struct dentry * | 39 | STATIC struct dentry * |
| 56 | linvfs_decode_fh( | 40 | linvfs_decode_fh( |
| 57 | struct super_block *sb, | 41 | struct super_block *sb, |
| @@ -92,7 +76,7 @@ linvfs_decode_fh( | |||
| 92 | p = xfs_fileid_decode_fid2(p, &pfid, is64); | 76 | p = xfs_fileid_decode_fid2(p, &pfid, is64); |
| 93 | parent = &pfid; | 77 | parent = &pfid; |
| 94 | } | 78 | } |
| 95 | 79 | ||
| 96 | fh = (__u32 *)&ifid; | 80 | fh = (__u32 *)&ifid; |
| 97 | return find_exported_dentry(sb, fh, parent, acceptable, context); | 81 | return find_exported_dentry(sb, fh, parent, acceptable, context); |
| 98 | } | 82 | } |
| @@ -112,9 +96,8 @@ linvfs_encode_fh( | |||
| 112 | int is64 = 0; | 96 | int is64 = 0; |
| 113 | #if XFS_BIG_INUMS | 97 | #if XFS_BIG_INUMS |
| 114 | vfs_t *vfs = LINVFS_GET_VFS(inode->i_sb); | 98 | vfs_t *vfs = LINVFS_GET_VFS(inode->i_sb); |
| 115 | xfs_mount_t *mp = XFS_VFSTOM(vfs); | 99 | |
| 116 | 100 | if (!(vfs->vfs_flag & VFS_32BITINODES)) { | |
| 117 | if (!(mp->m_flags & XFS_MOUNT_32BITINOOPT)) { | ||
| 118 | /* filesystem may contain 64bit inode numbers */ | 101 | /* filesystem may contain 64bit inode numbers */ |
| 119 | is64 = XFS_FILEID_TYPE_64FLAG; | 102 | is64 = XFS_FILEID_TYPE_64FLAG; |
| 120 | } | 103 | } |
diff --git a/fs/xfs/linux-2.6/xfs_export.h b/fs/xfs/linux-2.6/xfs_export.h index 60b2abac1c18..e5b0559700a4 100644 --- a/fs/xfs/linux-2.6/xfs_export.h +++ b/fs/xfs/linux-2.6/xfs_export.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_EXPORT_H__ | 18 | #ifndef __XFS_EXPORT_H__ |
| 33 | #define __XFS_EXPORT_H__ | 19 | #define __XFS_EXPORT_H__ |
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 3881622bcf08..06111d0bbae4 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
| @@ -1,39 +1,26 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include "xfs.h" | 18 | #include "xfs.h" |
| 34 | #include "xfs_inum.h" | 19 | #include "xfs_bit.h" |
| 35 | #include "xfs_log.h" | 20 | #include "xfs_log.h" |
| 21 | #include "xfs_inum.h" | ||
| 36 | #include "xfs_sb.h" | 22 | #include "xfs_sb.h" |
| 23 | #include "xfs_ag.h" | ||
| 37 | #include "xfs_dir.h" | 24 | #include "xfs_dir.h" |
| 38 | #include "xfs_dir2.h" | 25 | #include "xfs_dir2.h" |
| 39 | #include "xfs_trans.h" | 26 | #include "xfs_trans.h" |
diff --git a/fs/xfs/linux-2.6/xfs_fs_subr.c b/fs/xfs/linux-2.6/xfs_fs_subr.c index 05ebd30ec96f..f89340c61bf2 100644 --- a/fs/xfs/linux-2.6/xfs_fs_subr.c +++ b/fs/xfs/linux-2.6/xfs_fs_subr.c | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | 18 | ||
| 33 | #include "xfs.h" | 19 | #include "xfs.h" |
| @@ -117,6 +103,8 @@ fs_flush_pages( | |||
| 117 | 103 | ||
| 118 | if (VN_CACHED(vp)) { | 104 | if (VN_CACHED(vp)) { |
| 119 | filemap_fdatawrite(ip->i_mapping); | 105 | filemap_fdatawrite(ip->i_mapping); |
| 106 | if (flags & XFS_B_ASYNC) | ||
| 107 | return 0; | ||
| 120 | filemap_fdatawait(ip->i_mapping); | 108 | filemap_fdatawait(ip->i_mapping); |
| 121 | } | 109 | } |
| 122 | 110 | ||
diff --git a/fs/xfs/linux-2.6/xfs_fs_subr.h b/fs/xfs/linux-2.6/xfs_fs_subr.h index 2db9ddbd4567..aee9ccdd18f7 100644 --- a/fs/xfs/linux-2.6/xfs_fs_subr.h +++ b/fs/xfs/linux-2.6/xfs_fs_subr.h | |||
| @@ -1,48 +1,29 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000,2002,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | ||
| 32 | #ifndef __XFS_SUBR_H__ | ||
| 33 | #define __XFS_SUBR_H__ | ||
| 34 | |||
| 35 | /* | ||
| 36 | * Utilities shared among file system implementations. | ||
| 37 | */ | 17 | */ |
| 18 | #ifndef __XFS_FS_SUBR_H__ | ||
| 19 | #define __XFS_FS_SUBR_H__ | ||
| 38 | 20 | ||
| 39 | struct cred; | 21 | struct cred; |
| 40 | 22 | extern int fs_noerr(void); | |
| 41 | extern int fs_noerr(void); | 23 | extern int fs_nosys(void); |
| 42 | extern int fs_nosys(void); | 24 | extern void fs_noval(void); |
| 43 | extern void fs_noval(void); | 25 | extern void fs_tosspages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); |
| 44 | extern void fs_tosspages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); | 26 | extern void fs_flushinval_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); |
| 45 | extern void fs_flushinval_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); | 27 | extern int fs_flush_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, uint64_t, int); |
| 46 | extern int fs_flush_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, uint64_t, int); | ||
| 47 | 28 | ||
| 48 | #endif /* __XFS_FS_SUBR_H__ */ | 29 | #endif /* __XFS_FS_SUBR_H__ */ |
diff --git a/fs/xfs/linux-2.6/xfs_globals.c b/fs/xfs/linux-2.6/xfs_globals.c index a6da5b4fd240..6e8085f34635 100644 --- a/fs/xfs/linux-2.6/xfs_globals.c +++ b/fs/xfs/linux-2.6/xfs_globals.c | |||
| @@ -1,40 +1,20 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | /* | ||
| 34 | * This file contains globals needed by XFS that were normally defined | ||
| 35 | * somewhere else in IRIX. | ||
| 36 | */ | ||
| 37 | |||
| 38 | #include "xfs.h" | 18 | #include "xfs.h" |
| 39 | #include "xfs_cred.h" | 19 | #include "xfs_cred.h" |
| 40 | #include "xfs_sysctl.h" | 20 | #include "xfs_sysctl.h" |
diff --git a/fs/xfs/linux-2.6/xfs_globals.h b/fs/xfs/linux-2.6/xfs_globals.h index e81e2f38a853..e1a22bfcf865 100644 --- a/fs/xfs/linux-2.6/xfs_globals.h +++ b/fs/xfs/linux-2.6/xfs_globals.h | |||
| @@ -1,42 +1,23 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_GLOBALS_H__ | 18 | #ifndef __XFS_GLOBALS_H__ |
| 33 | #define __XFS_GLOBALS_H__ | 19 | #define __XFS_GLOBALS_H__ |
| 34 | 20 | ||
| 35 | /* | ||
| 36 | * This file declares globals needed by XFS that were normally defined | ||
| 37 | * somewhere else in IRIX. | ||
| 38 | */ | ||
| 39 | |||
| 40 | extern uint64_t xfs_panic_mask; /* set to cause more panics */ | 21 | extern uint64_t xfs_panic_mask; /* set to cause more panics */ |
| 41 | extern unsigned long xfs_physmem; | 22 | extern unsigned long xfs_physmem; |
| 42 | extern struct cred *sys_cred; | 23 | extern struct cred *sys_cred; |
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 6a3326bcd8d0..b78b5eb9e96c 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
| @@ -1,67 +1,52 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include "xfs.h" | 18 | #include "xfs.h" |
| 34 | |||
| 35 | #include "xfs_fs.h" | 19 | #include "xfs_fs.h" |
| 36 | #include "xfs_inum.h" | 20 | #include "xfs_bit.h" |
| 37 | #include "xfs_log.h" | 21 | #include "xfs_log.h" |
| 22 | #include "xfs_inum.h" | ||
| 38 | #include "xfs_trans.h" | 23 | #include "xfs_trans.h" |
| 39 | #include "xfs_sb.h" | 24 | #include "xfs_sb.h" |
| 25 | #include "xfs_ag.h" | ||
| 40 | #include "xfs_dir.h" | 26 | #include "xfs_dir.h" |
| 41 | #include "xfs_dir2.h" | 27 | #include "xfs_dir2.h" |
| 42 | #include "xfs_alloc.h" | 28 | #include "xfs_alloc.h" |
| 43 | #include "xfs_dmapi.h" | 29 | #include "xfs_dmapi.h" |
| 44 | #include "xfs_mount.h" | 30 | #include "xfs_mount.h" |
| 45 | #include "xfs_alloc_btree.h" | ||
| 46 | #include "xfs_bmap_btree.h" | 31 | #include "xfs_bmap_btree.h" |
| 32 | #include "xfs_alloc_btree.h" | ||
| 47 | #include "xfs_ialloc_btree.h" | 33 | #include "xfs_ialloc_btree.h" |
| 48 | #include "xfs_btree.h" | ||
| 49 | #include "xfs_ialloc.h" | ||
| 50 | #include "xfs_attr_sf.h" | ||
| 51 | #include "xfs_dir_sf.h" | 34 | #include "xfs_dir_sf.h" |
| 35 | #include "xfs_attr_sf.h" | ||
| 52 | #include "xfs_dir2_sf.h" | 36 | #include "xfs_dir2_sf.h" |
| 53 | #include "xfs_dinode.h" | 37 | #include "xfs_dinode.h" |
| 54 | #include "xfs_inode.h" | 38 | #include "xfs_inode.h" |
| 55 | #include "xfs_bmap.h" | 39 | #include "xfs_btree.h" |
| 56 | #include "xfs_bit.h" | 40 | #include "xfs_ialloc.h" |
| 57 | #include "xfs_rtalloc.h" | 41 | #include "xfs_rtalloc.h" |
| 58 | #include "xfs_error.h" | ||
| 59 | #include "xfs_itable.h" | 42 | #include "xfs_itable.h" |
| 43 | #include "xfs_error.h" | ||
| 60 | #include "xfs_rw.h" | 44 | #include "xfs_rw.h" |
| 61 | #include "xfs_acl.h" | 45 | #include "xfs_acl.h" |
| 62 | #include "xfs_cap.h" | 46 | #include "xfs_cap.h" |
| 63 | #include "xfs_mac.h" | 47 | #include "xfs_mac.h" |
| 64 | #include "xfs_attr.h" | 48 | #include "xfs_attr.h" |
| 49 | #include "xfs_bmap.h" | ||
| 65 | #include "xfs_buf_item.h" | 50 | #include "xfs_buf_item.h" |
| 66 | #include "xfs_utils.h" | 51 | #include "xfs_utils.h" |
| 67 | #include "xfs_dfrag.h" | 52 | #include "xfs_dfrag.h" |
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index 4636b7f86f1f..c83ae15bb0e6 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c | |||
| @@ -1,35 +1,20 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2004-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include <linux/config.h> | 18 | #include <linux/config.h> |
| 34 | #include <linux/compat.h> | 19 | #include <linux/compat.h> |
| 35 | #include <linux/init.h> | 20 | #include <linux/init.h> |
| @@ -39,7 +24,6 @@ | |||
| 39 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 40 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
| 41 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
| 42 | |||
| 43 | #include "xfs.h" | 27 | #include "xfs.h" |
| 44 | #include "xfs_types.h" | 28 | #include "xfs_types.h" |
| 45 | #include "xfs_fs.h" | 29 | #include "xfs_fs.h" |
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.h b/fs/xfs/linux-2.6/xfs_ioctl32.h index c874793a1dc9..011c273bec50 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.h +++ b/fs/xfs/linux-2.6/xfs_ioctl32.h | |||
| @@ -1,34 +1,24 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2004-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 18 | #ifndef __XFS_IOCTL32_H__ | ||
| 19 | #define __XFS_IOCTL32_H__ | ||
| 20 | |||
| 21 | extern long linvfs_compat_ioctl(struct file *, unsigned, unsigned long); | ||
| 22 | extern long linvfs_compat_invis_ioctl(struct file *f, unsigned, unsigned long); | ||
| 32 | 23 | ||
| 33 | long linvfs_compat_ioctl(struct file *f, unsigned cmd, unsigned long arg); | 24 | #endif /* __XFS_IOCTL32_H__ */ |
| 34 | long linvfs_compat_invis_ioctl(struct file *f, unsigned cmd, unsigned long arg); | ||
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 77708a8c9f87..14215a7db59f 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
| @@ -1,39 +1,25 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include "xfs.h" | 18 | #include "xfs.h" |
| 34 | #include "xfs_fs.h" | 19 | #include "xfs_fs.h" |
| 35 | #include "xfs_inum.h" | 20 | #include "xfs_bit.h" |
| 36 | #include "xfs_log.h" | 21 | #include "xfs_log.h" |
| 22 | #include "xfs_inum.h" | ||
| 37 | #include "xfs_trans.h" | 23 | #include "xfs_trans.h" |
| 38 | #include "xfs_sb.h" | 24 | #include "xfs_sb.h" |
| 39 | #include "xfs_ag.h" | 25 | #include "xfs_ag.h" |
| @@ -43,18 +29,17 @@ | |||
| 43 | #include "xfs_dmapi.h" | 29 | #include "xfs_dmapi.h" |
| 44 | #include "xfs_quota.h" | 30 | #include "xfs_quota.h" |
| 45 | #include "xfs_mount.h" | 31 | #include "xfs_mount.h" |
| 46 | #include "xfs_alloc_btree.h" | ||
| 47 | #include "xfs_bmap_btree.h" | 32 | #include "xfs_bmap_btree.h" |
| 33 | #include "xfs_alloc_btree.h" | ||
| 48 | #include "xfs_ialloc_btree.h" | 34 | #include "xfs_ialloc_btree.h" |
| 49 | #include "xfs_btree.h" | ||
| 50 | #include "xfs_ialloc.h" | ||
| 51 | #include "xfs_attr_sf.h" | ||
| 52 | #include "xfs_dir_sf.h" | 35 | #include "xfs_dir_sf.h" |
| 53 | #include "xfs_dir2_sf.h" | 36 | #include "xfs_dir2_sf.h" |
| 37 | #include "xfs_attr_sf.h" | ||
| 54 | #include "xfs_dinode.h" | 38 | #include "xfs_dinode.h" |
| 55 | #include "xfs_inode.h" | 39 | #include "xfs_inode.h" |
| 56 | #include "xfs_bmap.h" | 40 | #include "xfs_bmap.h" |
| 57 | #include "xfs_bit.h" | 41 | #include "xfs_btree.h" |
| 42 | #include "xfs_ialloc.h" | ||
| 58 | #include "xfs_rtalloc.h" | 43 | #include "xfs_rtalloc.h" |
| 59 | #include "xfs_error.h" | 44 | #include "xfs_error.h" |
| 60 | #include "xfs_itable.h" | 45 | #include "xfs_itable.h" |
| @@ -69,6 +54,137 @@ | |||
| 69 | #include <linux/xattr.h> | 54 | #include <linux/xattr.h> |
| 70 | #include <linux/namei.h> | 55 | #include <linux/namei.h> |
| 71 | 56 | ||
| 57 | /* | ||
| 58 | * Change the requested timestamp in the given inode. | ||
| 59 | * We don't lock across timestamp updates, and we don't log them but | ||
| 60 | * we do record the fact that there is dirty information in core. | ||
| 61 | * | ||
| 62 | * NOTE -- callers MUST combine XFS_ICHGTIME_MOD or XFS_ICHGTIME_CHG | ||
| 63 | * with XFS_ICHGTIME_ACC to be sure that access time | ||
| 64 | * update will take. Calling first with XFS_ICHGTIME_ACC | ||
| 65 | * and then XFS_ICHGTIME_MOD may fail to modify the access | ||
| 66 | * timestamp if the filesystem is mounted noacctm. | ||
| 67 | */ | ||
| 68 | void | ||
| 69 | xfs_ichgtime( | ||
| 70 | xfs_inode_t *ip, | ||
| 71 | int flags) | ||
| 72 | { | ||
| 73 | struct inode *inode = LINVFS_GET_IP(XFS_ITOV(ip)); | ||
| 74 | timespec_t tv; | ||
| 75 | |||
| 76 | /* | ||
| 77 | * We're not supposed to change timestamps in readonly-mounted | ||
| 78 | * filesystems. Throw it away if anyone asks us. | ||
| 79 | */ | ||
| 80 | if (unlikely(IS_RDONLY(inode))) | ||
| 81 | return; | ||
| 82 | |||
| 83 | /* | ||
| 84 | * Don't update access timestamps on reads if mounted "noatime". | ||
| 85 | * Throw it away if anyone asks us. | ||
| 86 | */ | ||
| 87 | if (unlikely( | ||
| 88 | (ip->i_mount->m_flags & XFS_MOUNT_NOATIME || IS_NOATIME(inode)) && | ||
| 89 | (flags & (XFS_ICHGTIME_ACC|XFS_ICHGTIME_MOD|XFS_ICHGTIME_CHG)) == | ||
| 90 | XFS_ICHGTIME_ACC)) | ||
| 91 | return; | ||
| 92 | |||
| 93 | nanotime(&tv); | ||
| 94 | if (flags & XFS_ICHGTIME_MOD) { | ||
| 95 | inode->i_mtime = tv; | ||
| 96 | ip->i_d.di_mtime.t_sec = (__int32_t)tv.tv_sec; | ||
| 97 | ip->i_d.di_mtime.t_nsec = (__int32_t)tv.tv_nsec; | ||
| 98 | } | ||
| 99 | if (flags & XFS_ICHGTIME_ACC) { | ||
| 100 | inode->i_atime = tv; | ||
| 101 | ip->i_d.di_atime.t_sec = (__int32_t)tv.tv_sec; | ||
| 102 | ip->i_d.di_atime.t_nsec = (__int32_t)tv.tv_nsec; | ||
| 103 | } | ||
| 104 | if (flags & XFS_ICHGTIME_CHG) { | ||
| 105 | inode->i_ctime = tv; | ||
| 106 | ip->i_d.di_ctime.t_sec = (__int32_t)tv.tv_sec; | ||
| 107 | ip->i_d.di_ctime.t_nsec = (__int32_t)tv.tv_nsec; | ||
| 108 | } | ||
| 109 | |||
| 110 | /* | ||
| 111 | * We update the i_update_core field _after_ changing | ||
| 112 | * the timestamps in order to coordinate properly with | ||
| 113 | * xfs_iflush() so that we don't lose timestamp updates. | ||
| 114 | * This keeps us from having to hold the inode lock | ||
| 115 | * while doing this. We use the SYNCHRONIZE macro to | ||
| 116 | * ensure that the compiler does not reorder the update | ||
| 117 | * of i_update_core above the timestamp updates above. | ||
| 118 | */ | ||
| 119 | SYNCHRONIZE(); | ||
| 120 | ip->i_update_core = 1; | ||
| 121 | if (!(inode->i_state & I_LOCK)) | ||
| 122 | mark_inode_dirty_sync(inode); | ||
| 123 | } | ||
| 124 | |||
| 125 | /* | ||
| 126 | * Variant on the above which avoids querying the system clock | ||
| 127 | * in situations where we know the Linux inode timestamps have | ||
| 128 | * just been updated (and so we can update our inode cheaply). | ||
| 129 | * We also skip the readonly and noatime checks here, they are | ||
| 130 | * also catered for already. | ||
| 131 | */ | ||
| 132 | void | ||
| 133 | xfs_ichgtime_fast( | ||
| 134 | xfs_inode_t *ip, | ||
| 135 | struct inode *inode, | ||
| 136 | int flags) | ||
| 137 | { | ||
| 138 | timespec_t *tvp; | ||
| 139 | |||
| 140 | /* | ||
| 141 | * We're not supposed to change timestamps in readonly-mounted | ||
| 142 | * filesystems. Throw it away if anyone asks us. | ||
| 143 | */ | ||
| 144 | if (unlikely(IS_RDONLY(inode))) | ||
| 145 | return; | ||
| 146 | |||
| 147 | /* | ||
| 148 | * Don't update access timestamps on reads if mounted "noatime". | ||
| 149 | * Throw it away if anyone asks us. | ||
| 150 | */ | ||
| 151 | if (unlikely( | ||
| 152 | (ip->i_mount->m_flags & XFS_MOUNT_NOATIME || IS_NOATIME(inode)) && | ||
| 153 | ((flags & (XFS_ICHGTIME_ACC|XFS_ICHGTIME_MOD|XFS_ICHGTIME_CHG)) == | ||
| 154 | XFS_ICHGTIME_ACC))) | ||
| 155 | return; | ||
| 156 | |||
| 157 | if (flags & XFS_ICHGTIME_MOD) { | ||
| 158 | tvp = &inode->i_mtime; | ||
| 159 | ip->i_d.di_mtime.t_sec = (__int32_t)tvp->tv_sec; | ||
| 160 | ip->i_d.di_mtime.t_nsec = (__int32_t)tvp->tv_nsec; | ||
| 161 | } | ||
| 162 | if (flags & XFS_ICHGTIME_ACC) { | ||
| 163 | tvp = &inode->i_atime; | ||
| 164 | ip->i_d.di_atime.t_sec = (__int32_t)tvp->tv_sec; | ||
| 165 | ip->i_d.di_atime.t_nsec = (__int32_t)tvp->tv_nsec; | ||
| 166 | } | ||
| 167 | if (flags & XFS_ICHGTIME_CHG) { | ||
| 168 | tvp = &inode->i_ctime; | ||
| 169 | ip->i_d.di_ctime.t_sec = (__int32_t)tvp->tv_sec; | ||
| 170 | ip->i_d.di_ctime.t_nsec = (__int32_t)tvp->tv_nsec; | ||
| 171 | } | ||
| 172 | |||
| 173 | /* | ||
| 174 | * We update the i_update_core field _after_ changing | ||
| 175 | * the timestamps in order to coordinate properly with | ||
| 176 | * xfs_iflush() so that we don't lose timestamp updates. | ||
| 177 | * This keeps us from having to hold the inode lock | ||
| 178 | * while doing this. We use the SYNCHRONIZE macro to | ||
| 179 | * ensure that the compiler does not reorder the update | ||
| 180 | * of i_update_core above the timestamp updates above. | ||
| 181 | */ | ||
| 182 | SYNCHRONIZE(); | ||
| 183 | ip->i_update_core = 1; | ||
| 184 | if (!(inode->i_state & I_LOCK)) | ||
| 185 | mark_inode_dirty_sync(inode); | ||
| 186 | } | ||
| 187 | |||
| 72 | 188 | ||
| 73 | /* | 189 | /* |
| 74 | * Pull the link count and size up from the xfs inode to the linux inode | 190 | * Pull the link count and size up from the xfs inode to the linux inode |
diff --git a/fs/xfs/linux-2.6/xfs_iops.h b/fs/xfs/linux-2.6/xfs_iops.h index 6a69a62c36b0..ee784b63acbf 100644 --- a/fs/xfs/linux-2.6/xfs_iops.h +++ b/fs/xfs/linux-2.6/xfs_iops.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_IOPS_H__ | 18 | #ifndef __XFS_IOPS_H__ |
| 33 | #define __XFS_IOPS_H__ | 19 | #define __XFS_IOPS_H__ |
| @@ -48,4 +34,8 @@ extern void linvfs_unwritten_done(struct buffer_head *, int); | |||
| 48 | extern int xfs_ioctl(struct bhv_desc *, struct inode *, struct file *, | 34 | extern int xfs_ioctl(struct bhv_desc *, struct inode *, struct file *, |
| 49 | int, unsigned int, void __user *); | 35 | int, unsigned int, void __user *); |
| 50 | 36 | ||
| 37 | struct xfs_inode; | ||
| 38 | extern void xfs_ichgtime(struct xfs_inode *, int); | ||
| 39 | extern void xfs_ichgtime_fast(struct xfs_inode *, struct inode *, int); | ||
| 40 | |||
| 51 | #endif /* __XFS_IOPS_H__ */ | 41 | #endif /* __XFS_IOPS_H__ */ |
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index 68c5d885ed9c..44fed10af0dd 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_LINUX__ | 18 | #ifndef __XFS_LINUX__ |
| 33 | #define __XFS_LINUX__ | 19 | #define __XFS_LINUX__ |
| @@ -197,10 +183,6 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh) | |||
| 197 | /* bytes to clicks */ | 183 | /* bytes to clicks */ |
| 198 | #define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT) | 184 | #define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT) |
| 199 | 185 | ||
| 200 | #ifndef CELL_CAPABLE | ||
| 201 | #define FSC_NOTIFY_NAME_CHANGED(vp) | ||
| 202 | #endif | ||
| 203 | |||
| 204 | #ifndef ENOATTR | 186 | #ifndef ENOATTR |
| 205 | #define ENOATTR ENODATA /* Attribute not found */ | 187 | #define ENOATTR ENODATA /* Attribute not found */ |
| 206 | #endif | 188 | #endif |
| @@ -235,30 +217,18 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh) | |||
| 235 | #define Q_XSETPQLIM XQM_CMD(10) /* set projects disk limits */ | 217 | #define Q_XSETPQLIM XQM_CMD(10) /* set projects disk limits */ |
| 236 | #define Q_XGETPQUOTA XQM_CMD(11) /* get projects disk limits */ | 218 | #define Q_XGETPQUOTA XQM_CMD(11) /* get projects disk limits */ |
| 237 | 219 | ||
| 238 | /* IRIX uses a dynamic sizing algorithm (ndquot = 200 + numprocs*2) */ | 220 | #define dfltprid 0 |
| 239 | /* we may well need to fine-tune this if it ever becomes an issue. */ | ||
| 240 | #define DQUOT_MAX_HEURISTIC 1024 /* NR_DQUOTS */ | ||
| 241 | #define ndquot DQUOT_MAX_HEURISTIC | ||
| 242 | |||
| 243 | /* IRIX uses the current size of the name cache to guess a good value */ | ||
| 244 | /* - this isn't the same but is a good enough starting point for now. */ | ||
| 245 | #define DQUOT_HASH_HEURISTIC files_stat.nr_files | ||
| 246 | |||
| 247 | /* IRIX inodes maintain the project ID also, zero this field on Linux */ | ||
| 248 | #define DEFAULT_PROJID 0 | ||
| 249 | #define dfltprid DEFAULT_PROJID | ||
| 250 | |||
| 251 | #define MAXPATHLEN 1024 | 221 | #define MAXPATHLEN 1024 |
| 252 | 222 | ||
| 253 | #define MIN(a,b) (min(a,b)) | 223 | #define MIN(a,b) (min(a,b)) |
| 254 | #define MAX(a,b) (max(a,b)) | 224 | #define MAX(a,b) (max(a,b)) |
| 255 | #define howmany(x, y) (((x)+((y)-1))/(y)) | 225 | #define howmany(x, y) (((x)+((y)-1))/(y)) |
| 256 | #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) | 226 | #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) |
| 257 | #define qsort(a,n,s,fn) sort(a,n,s,fn,NULL) | ||
| 258 | 227 | ||
| 259 | /* | 228 | /* |
| 260 | * Various platform dependent calls that don't fit anywhere else | 229 | * Various platform dependent calls that don't fit anywhere else |
| 261 | */ | 230 | */ |
| 231 | #define xfs_sort(a,n,s,fn) sort(a,n,s,fn,NULL) | ||
| 262 | #define xfs_stack_trace() dump_stack() | 232 | #define xfs_stack_trace() dump_stack() |
| 263 | #define xfs_itruncate_data(ip, off) \ | 233 | #define xfs_itruncate_data(ip, off) \ |
| 264 | (-vmtruncate(LINVFS_GET_IP(XFS_ITOV(ip)), (off))) | 234 | (-vmtruncate(LINVFS_GET_IP(XFS_ITOV(ip)), (off))) |
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 3b5fabe8dae9..279e9bc92aba 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
| @@ -1,44 +1,25 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | /* | ||
| 33 | * fs/xfs/linux/xfs_lrw.c (Linux Read Write stuff) | ||
| 34 | * | ||
| 35 | */ | ||
| 36 | |||
| 37 | #include "xfs.h" | 18 | #include "xfs.h" |
| 38 | |||
| 39 | #include "xfs_fs.h" | 19 | #include "xfs_fs.h" |
| 40 | #include "xfs_inum.h" | 20 | #include "xfs_bit.h" |
| 41 | #include "xfs_log.h" | 21 | #include "xfs_log.h" |
| 22 | #include "xfs_inum.h" | ||
| 42 | #include "xfs_trans.h" | 23 | #include "xfs_trans.h" |
| 43 | #include "xfs_sb.h" | 24 | #include "xfs_sb.h" |
| 44 | #include "xfs_ag.h" | 25 | #include "xfs_ag.h" |
| @@ -48,18 +29,17 @@ | |||
| 48 | #include "xfs_dmapi.h" | 29 | #include "xfs_dmapi.h" |
| 49 | #include "xfs_quota.h" | 30 | #include "xfs_quota.h" |
| 50 | #include "xfs_mount.h" | 31 | #include "xfs_mount.h" |
| 51 | #include "xfs_alloc_btree.h" | ||
| 52 | #include "xfs_bmap_btree.h" | 32 | #include "xfs_bmap_btree.h" |
| 33 | #include "xfs_alloc_btree.h" | ||
| 53 | #include "xfs_ialloc_btree.h" | 34 | #include "xfs_ialloc_btree.h" |
| 54 | #include "xfs_btree.h" | ||
| 55 | #include "xfs_ialloc.h" | ||
| 56 | #include "xfs_attr_sf.h" | ||
| 57 | #include "xfs_dir_sf.h" | 35 | #include "xfs_dir_sf.h" |
| 58 | #include "xfs_dir2_sf.h" | 36 | #include "xfs_dir2_sf.h" |
| 37 | #include "xfs_attr_sf.h" | ||
| 59 | #include "xfs_dinode.h" | 38 | #include "xfs_dinode.h" |
| 60 | #include "xfs_inode.h" | 39 | #include "xfs_inode.h" |
| 61 | #include "xfs_bmap.h" | 40 | #include "xfs_bmap.h" |
| 62 | #include "xfs_bit.h" | 41 | #include "xfs_btree.h" |
| 42 | #include "xfs_ialloc.h" | ||
| 63 | #include "xfs_rtalloc.h" | 43 | #include "xfs_rtalloc.h" |
| 64 | #include "xfs_error.h" | 44 | #include "xfs_error.h" |
| 65 | #include "xfs_itable.h" | 45 | #include "xfs_itable.h" |
| @@ -302,7 +282,7 @@ xfs_read( | |||
| 302 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | 282 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); |
| 303 | 283 | ||
| 304 | if (likely(!(ioflags & IO_INVIS))) | 284 | if (likely(!(ioflags & IO_INVIS))) |
| 305 | xfs_ichgtime(ip, XFS_ICHGTIME_ACC); | 285 | xfs_ichgtime_fast(ip, inode, XFS_ICHGTIME_ACC); |
| 306 | 286 | ||
| 307 | unlock_isem: | 287 | unlock_isem: |
| 308 | if (unlikely(ioflags & IO_ISDIRECT)) | 288 | if (unlikely(ioflags & IO_ISDIRECT)) |
| @@ -367,7 +347,7 @@ xfs_sendfile( | |||
| 367 | XFS_STATS_ADD(xs_read_bytes, ret); | 347 | XFS_STATS_ADD(xs_read_bytes, ret); |
| 368 | 348 | ||
| 369 | if (likely(!(ioflags & IO_INVIS))) | 349 | if (likely(!(ioflags & IO_INVIS))) |
| 370 | xfs_ichgtime(ip, XFS_ICHGTIME_ACC); | 350 | xfs_ichgtime_fast(ip, LINVFS_GET_IP(vp), XFS_ICHGTIME_ACC); |
| 371 | 351 | ||
| 372 | return ret; | 352 | return ret; |
| 373 | } | 353 | } |
| @@ -732,15 +712,10 @@ start: | |||
| 732 | } | 712 | } |
| 733 | } | 713 | } |
| 734 | 714 | ||
| 735 | /* | 715 | if (likely(!(ioflags & IO_INVIS))) { |
| 736 | * On Linux, generic_file_write updates the times even if | ||
| 737 | * no data is copied in so long as the write had a size. | ||
| 738 | * | ||
| 739 | * We must update xfs' times since revalidate will overcopy xfs. | ||
| 740 | */ | ||
| 741 | if (!(ioflags & IO_INVIS)) { | ||
| 742 | xfs_ichgtime(xip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); | ||
| 743 | inode_update_time(inode, 1); | 716 | inode_update_time(inode, 1); |
| 717 | xfs_ichgtime_fast(xip, inode, | ||
| 718 | XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); | ||
| 744 | } | 719 | } |
| 745 | 720 | ||
| 746 | /* | 721 | /* |
diff --git a/fs/xfs/linux-2.6/xfs_lrw.h b/fs/xfs/linux-2.6/xfs_lrw.h index 6294dcdb797c..38864a88d42d 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.h +++ b/fs/xfs/linux-2.6/xfs_lrw.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_LRW_H__ | 18 | #ifndef __XFS_LRW_H__ |
| 33 | #define __XFS_LRW_H__ | 19 | #define __XFS_LRW_H__ |
| @@ -107,9 +93,4 @@ extern ssize_t xfs_sendfile(struct bhv_desc *, struct file *, | |||
| 107 | 93 | ||
| 108 | extern int xfs_dev_is_read_only(struct xfs_mount *, char *); | 94 | extern int xfs_dev_is_read_only(struct xfs_mount *, char *); |
| 109 | 95 | ||
| 110 | #define XFS_FSB_TO_DB_IO(io,fsb) \ | ||
| 111 | (((io)->io_flags & XFS_IOCORE_RT) ? \ | ||
| 112 | XFS_FSB_TO_BB((io)->io_mount, (fsb)) : \ | ||
| 113 | XFS_FSB_TO_DADDR((io)->io_mount, (fsb))) | ||
| 114 | |||
| 115 | #endif /* __XFS_LRW_H__ */ | 96 | #endif /* __XFS_LRW_H__ */ |
diff --git a/fs/xfs/linux-2.6/xfs_stats.c b/fs/xfs/linux-2.6/xfs_stats.c index aaf5ddba47f3..6c40a74be7c8 100644 --- a/fs/xfs/linux-2.6/xfs_stats.c +++ b/fs/xfs/linux-2.6/xfs_stats.c | |||
| @@ -1,35 +1,20 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include "xfs.h" | 18 | #include "xfs.h" |
| 34 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
| 35 | 20 | ||
diff --git a/fs/xfs/linux-2.6/xfs_stats.h b/fs/xfs/linux-2.6/xfs_stats.h index 3f756a6c3eb0..50027c4a5618 100644 --- a/fs/xfs/linux-2.6/xfs_stats.h +++ b/fs/xfs/linux-2.6/xfs_stats.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_STATS_H__ | 18 | #ifndef __XFS_STATS_H__ |
| 33 | #define __XFS_STATS_H__ | 19 | #define __XFS_STATS_H__ |
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 2302454d8d47..6116b5bf433e 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
| @@ -1,60 +1,45 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include "xfs.h" | 18 | #include "xfs.h" |
| 34 | 19 | #include "xfs_bit.h" | |
| 35 | #include "xfs_inum.h" | ||
| 36 | #include "xfs_log.h" | 20 | #include "xfs_log.h" |
| 37 | #include "xfs_clnt.h" | 21 | #include "xfs_clnt.h" |
| 22 | #include "xfs_inum.h" | ||
| 38 | #include "xfs_trans.h" | 23 | #include "xfs_trans.h" |
| 39 | #include "xfs_sb.h" | 24 | #include "xfs_sb.h" |
| 25 | #include "xfs_ag.h" | ||
| 40 | #include "xfs_dir.h" | 26 | #include "xfs_dir.h" |
| 41 | #include "xfs_dir2.h" | 27 | #include "xfs_dir2.h" |
| 42 | #include "xfs_alloc.h" | 28 | #include "xfs_alloc.h" |
| 43 | #include "xfs_dmapi.h" | 29 | #include "xfs_dmapi.h" |
| 44 | #include "xfs_quota.h" | 30 | #include "xfs_quota.h" |
| 45 | #include "xfs_mount.h" | 31 | #include "xfs_mount.h" |
| 46 | #include "xfs_alloc_btree.h" | ||
| 47 | #include "xfs_bmap_btree.h" | 32 | #include "xfs_bmap_btree.h" |
| 33 | #include "xfs_alloc_btree.h" | ||
| 48 | #include "xfs_ialloc_btree.h" | 34 | #include "xfs_ialloc_btree.h" |
| 49 | #include "xfs_btree.h" | ||
| 50 | #include "xfs_ialloc.h" | ||
| 51 | #include "xfs_attr_sf.h" | ||
| 52 | #include "xfs_dir_sf.h" | 35 | #include "xfs_dir_sf.h" |
| 53 | #include "xfs_dir2_sf.h" | 36 | #include "xfs_dir2_sf.h" |
| 37 | #include "xfs_attr_sf.h" | ||
| 54 | #include "xfs_dinode.h" | 38 | #include "xfs_dinode.h" |
| 55 | #include "xfs_inode.h" | 39 | #include "xfs_inode.h" |
| 40 | #include "xfs_btree.h" | ||
| 41 | #include "xfs_ialloc.h" | ||
| 56 | #include "xfs_bmap.h" | 42 | #include "xfs_bmap.h" |
| 57 | #include "xfs_bit.h" | ||
| 58 | #include "xfs_rtalloc.h" | 43 | #include "xfs_rtalloc.h" |
| 59 | #include "xfs_error.h" | 44 | #include "xfs_error.h" |
| 60 | #include "xfs_itable.h" | 45 | #include "xfs_itable.h" |
| @@ -189,7 +174,7 @@ xfs_revalidate_inode( | |||
| 189 | break; | 174 | break; |
| 190 | } | 175 | } |
| 191 | 176 | ||
| 192 | inode->i_blksize = PAGE_CACHE_SIZE; | 177 | inode->i_blksize = xfs_preferred_iosize(mp); |
| 193 | inode->i_generation = ip->i_d.di_gen; | 178 | inode->i_generation = ip->i_d.di_gen; |
| 194 | i_size_write(inode, ip->i_d.di_size); | 179 | i_size_write(inode, ip->i_d.di_size); |
| 195 | inode->i_blocks = | 180 | inode->i_blocks = |
| @@ -278,6 +263,72 @@ xfs_blkdev_put( | |||
| 278 | close_bdev_excl(bdev); | 263 | close_bdev_excl(bdev); |
| 279 | } | 264 | } |
| 280 | 265 | ||
| 266 | /* | ||
| 267 | * Try to write out the superblock using barriers. | ||
| 268 | */ | ||
| 269 | STATIC int | ||
| 270 | xfs_barrier_test( | ||
| 271 | xfs_mount_t *mp) | ||
| 272 | { | ||
| 273 | xfs_buf_t *sbp = xfs_getsb(mp, 0); | ||
| 274 | int error; | ||
| 275 | |||
| 276 | XFS_BUF_UNDONE(sbp); | ||
| 277 | XFS_BUF_UNREAD(sbp); | ||
| 278 | XFS_BUF_UNDELAYWRITE(sbp); | ||
| 279 | XFS_BUF_WRITE(sbp); | ||
| 280 | XFS_BUF_UNASYNC(sbp); | ||
| 281 | XFS_BUF_ORDERED(sbp); | ||
| 282 | |||
| 283 | xfsbdstrat(mp, sbp); | ||
| 284 | error = xfs_iowait(sbp); | ||
| 285 | |||
| 286 | /* | ||
| 287 | * Clear all the flags we set and possible error state in the | ||
| 288 | * buffer. We only did the write to try out whether barriers | ||
| 289 | * worked and shouldn't leave any traces in the superblock | ||
| 290 | * buffer. | ||
| 291 | */ | ||
| 292 | XFS_BUF_DONE(sbp); | ||
| 293 | XFS_BUF_ERROR(sbp, 0); | ||
| 294 | XFS_BUF_UNORDERED(sbp); | ||
| 295 | |||
| 296 | xfs_buf_relse(sbp); | ||
| 297 | return error; | ||
| 298 | } | ||
| 299 | |||
| 300 | void | ||
| 301 | xfs_mountfs_check_barriers(xfs_mount_t *mp) | ||
| 302 | { | ||
| 303 | int error; | ||
| 304 | |||
| 305 | if (mp->m_logdev_targp != mp->m_ddev_targp) { | ||
| 306 | xfs_fs_cmn_err(CE_NOTE, mp, | ||
| 307 | "Disabling barriers, not supported with external log device"); | ||
| 308 | mp->m_flags &= ~XFS_MOUNT_BARRIER; | ||
| 309 | } | ||
| 310 | |||
| 311 | if (mp->m_ddev_targp->pbr_bdev->bd_disk->queue->ordered == | ||
| 312 | QUEUE_ORDERED_NONE) { | ||
| 313 | xfs_fs_cmn_err(CE_NOTE, mp, | ||
| 314 | "Disabling barriers, not supported by the underlying device"); | ||
| 315 | mp->m_flags &= ~XFS_MOUNT_BARRIER; | ||
| 316 | } | ||
| 317 | |||
| 318 | error = xfs_barrier_test(mp); | ||
| 319 | if (error) { | ||
| 320 | xfs_fs_cmn_err(CE_NOTE, mp, | ||
| 321 | "Disabling barriers, trial barrier write failed"); | ||
| 322 | mp->m_flags &= ~XFS_MOUNT_BARRIER; | ||
| 323 | } | ||
| 324 | } | ||
| 325 | |||
| 326 | void | ||
| 327 | xfs_blkdev_issue_flush( | ||
| 328 | xfs_buftarg_t *buftarg) | ||
| 329 | { | ||
| 330 | blkdev_issue_flush(buftarg->pbr_bdev, NULL); | ||
| 331 | } | ||
| 281 | 332 | ||
| 282 | STATIC struct inode * | 333 | STATIC struct inode * |
| 283 | linvfs_alloc_inode( | 334 | linvfs_alloc_inode( |
| @@ -701,6 +752,18 @@ linvfs_show_options( | |||
| 701 | } | 752 | } |
| 702 | 753 | ||
| 703 | STATIC int | 754 | STATIC int |
| 755 | linvfs_quotasync( | ||
| 756 | struct super_block *sb, | ||
| 757 | int type) | ||
| 758 | { | ||
| 759 | struct vfs *vfsp = LINVFS_GET_VFS(sb); | ||
| 760 | int error; | ||
| 761 | |||
| 762 | VFS_QUOTACTL(vfsp, Q_XQUOTASYNC, 0, (caddr_t)NULL, error); | ||
| 763 | return -error; | ||
| 764 | } | ||
| 765 | |||
| 766 | STATIC int | ||
| 704 | linvfs_getxstate( | 767 | linvfs_getxstate( |
| 705 | struct super_block *sb, | 768 | struct super_block *sb, |
| 706 | struct fs_quota_stat *fqs) | 769 | struct fs_quota_stat *fqs) |
| @@ -868,6 +931,7 @@ STATIC struct super_operations linvfs_sops = { | |||
| 868 | }; | 931 | }; |
| 869 | 932 | ||
| 870 | STATIC struct quotactl_ops linvfs_qops = { | 933 | STATIC struct quotactl_ops linvfs_qops = { |
| 934 | .quota_sync = linvfs_quotasync, | ||
| 871 | .get_xstate = linvfs_getxstate, | 935 | .get_xstate = linvfs_getxstate, |
| 872 | .set_xstate = linvfs_setxstate, | 936 | .set_xstate = linvfs_setxstate, |
| 873 | .get_xquota = linvfs_getxquota, | 937 | .get_xquota = linvfs_getxquota, |
diff --git a/fs/xfs/linux-2.6/xfs_super.h b/fs/xfs/linux-2.6/xfs_super.h index ec7e0035c731..df59408dca06 100644 --- a/fs/xfs/linux-2.6/xfs_super.h +++ b/fs/xfs/linux-2.6/xfs_super.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_SUPER_H__ | 18 | #ifndef __XFS_SUPER_H__ |
| 33 | #define __XFS_SUPER_H__ | 19 | #define __XFS_SUPER_H__ |
| @@ -132,6 +118,7 @@ extern void xfs_flush_device(struct xfs_inode *); | |||
| 132 | extern int xfs_blkdev_get(struct xfs_mount *, const char *, | 118 | extern int xfs_blkdev_get(struct xfs_mount *, const char *, |
| 133 | struct block_device **); | 119 | struct block_device **); |
| 134 | extern void xfs_blkdev_put(struct block_device *); | 120 | extern void xfs_blkdev_put(struct block_device *); |
| 121 | extern void xfs_blkdev_issue_flush(struct xfs_buftarg *); | ||
| 135 | 122 | ||
| 136 | extern struct export_operations linvfs_export_ops; | 123 | extern struct export_operations linvfs_export_ops; |
| 137 | 124 | ||
diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c index 0dc010356f4d..a02564972420 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.c +++ b/fs/xfs/linux-2.6/xfs_sysctl.c | |||
| @@ -1,44 +1,26 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2001-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2001-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include "xfs.h" | 18 | #include "xfs.h" |
| 34 | #include "xfs_rw.h" | ||
| 35 | #include <linux/sysctl.h> | 19 | #include <linux/sysctl.h> |
| 36 | #include <linux/proc_fs.h> | 20 | #include <linux/proc_fs.h> |
| 37 | 21 | ||
| 38 | |||
| 39 | static struct ctl_table_header *xfs_table_header; | 22 | static struct ctl_table_header *xfs_table_header; |
| 40 | 23 | ||
| 41 | |||
| 42 | #ifdef CONFIG_PROC_FS | 24 | #ifdef CONFIG_PROC_FS |
| 43 | STATIC int | 25 | STATIC int |
| 44 | xfs_stats_clear_proc_handler( | 26 | xfs_stats_clear_proc_handler( |
| @@ -76,7 +58,7 @@ xfs_stats_clear_proc_handler( | |||
| 76 | STATIC ctl_table xfs_table[] = { | 58 | STATIC ctl_table xfs_table[] = { |
| 77 | {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val, | 59 | {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val, |
| 78 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, | 60 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, |
| 79 | &sysctl_intvec, NULL, | 61 | &sysctl_intvec, NULL, |
| 80 | &xfs_params.restrict_chown.min, &xfs_params.restrict_chown.max}, | 62 | &xfs_params.restrict_chown.min, &xfs_params.restrict_chown.max}, |
| 81 | 63 | ||
| 82 | {XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val, | 64 | {XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val, |
| @@ -86,22 +68,22 @@ STATIC ctl_table xfs_table[] = { | |||
| 86 | 68 | ||
| 87 | {XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val, | 69 | {XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val, |
| 88 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, | 70 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, |
| 89 | &sysctl_intvec, NULL, | 71 | &sysctl_intvec, NULL, |
| 90 | &xfs_params.symlink_mode.min, &xfs_params.symlink_mode.max}, | 72 | &xfs_params.symlink_mode.min, &xfs_params.symlink_mode.max}, |
| 91 | 73 | ||
| 92 | {XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val, | 74 | {XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val, |
| 93 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, | 75 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, |
| 94 | &sysctl_intvec, NULL, | 76 | &sysctl_intvec, NULL, |
| 95 | &xfs_params.panic_mask.min, &xfs_params.panic_mask.max}, | 77 | &xfs_params.panic_mask.min, &xfs_params.panic_mask.max}, |
| 96 | 78 | ||
| 97 | {XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val, | 79 | {XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val, |
| 98 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, | 80 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, |
| 99 | &sysctl_intvec, NULL, | 81 | &sysctl_intvec, NULL, |
| 100 | &xfs_params.error_level.min, &xfs_params.error_level.max}, | 82 | &xfs_params.error_level.min, &xfs_params.error_level.max}, |
| 101 | 83 | ||
| 102 | {XFS_SYNCD_TIMER, "xfssyncd_centisecs", &xfs_params.syncd_timer.val, | 84 | {XFS_SYNCD_TIMER, "xfssyncd_centisecs", &xfs_params.syncd_timer.val, |
| 103 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, | 85 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, |
| 104 | &sysctl_intvec, NULL, | 86 | &sysctl_intvec, NULL, |
| 105 | &xfs_params.syncd_timer.min, &xfs_params.syncd_timer.max}, | 87 | &xfs_params.syncd_timer.min, &xfs_params.syncd_timer.max}, |
| 106 | 88 | ||
| 107 | {XFS_INHERIT_SYNC, "inherit_sync", &xfs_params.inherit_sync.val, | 89 | {XFS_INHERIT_SYNC, "inherit_sync", &xfs_params.inherit_sync.val, |
| @@ -118,7 +100,7 @@ STATIC ctl_table xfs_table[] = { | |||
| 118 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, | 100 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, |
| 119 | &sysctl_intvec, NULL, | 101 | &sysctl_intvec, NULL, |
| 120 | &xfs_params.inherit_noatim.min, &xfs_params.inherit_noatim.max}, | 102 | &xfs_params.inherit_noatim.min, &xfs_params.inherit_noatim.max}, |
| 121 | 103 | ||
| 122 | {XFS_BUF_TIMER, "xfsbufd_centisecs", &xfs_params.xfs_buf_timer.val, | 104 | {XFS_BUF_TIMER, "xfsbufd_centisecs", &xfs_params.xfs_buf_timer.val, |
| 123 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, | 105 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, |
| 124 | &sysctl_intvec, NULL, | 106 | &sysctl_intvec, NULL, |
| @@ -136,14 +118,14 @@ STATIC ctl_table xfs_table[] = { | |||
| 136 | 118 | ||
| 137 | {XFS_ROTORSTEP, "rotorstep", &xfs_params.rotorstep.val, | 119 | {XFS_ROTORSTEP, "rotorstep", &xfs_params.rotorstep.val, |
| 138 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, | 120 | sizeof(int), 0644, NULL, &proc_dointvec_minmax, |
| 139 | &sysctl_intvec, NULL, | 121 | &sysctl_intvec, NULL, |
| 140 | &xfs_params.rotorstep.min, &xfs_params.rotorstep.max}, | 122 | &xfs_params.rotorstep.min, &xfs_params.rotorstep.max}, |
| 141 | 123 | ||
| 142 | /* please keep this the last entry */ | 124 | /* please keep this the last entry */ |
| 143 | #ifdef CONFIG_PROC_FS | 125 | #ifdef CONFIG_PROC_FS |
| 144 | {XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear.val, | 126 | {XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear.val, |
| 145 | sizeof(int), 0644, NULL, &xfs_stats_clear_proc_handler, | 127 | sizeof(int), 0644, NULL, &xfs_stats_clear_proc_handler, |
| 146 | &sysctl_intvec, NULL, | 128 | &sysctl_intvec, NULL, |
| 147 | &xfs_params.stats_clear.min, &xfs_params.stats_clear.max}, | 129 | &xfs_params.stats_clear.min, &xfs_params.stats_clear.max}, |
| 148 | #endif /* CONFIG_PROC_FS */ | 130 | #endif /* CONFIG_PROC_FS */ |
| 149 | 131 | ||
diff --git a/fs/xfs/linux-2.6/xfs_sysctl.h b/fs/xfs/linux-2.6/xfs_sysctl.h index a39a95020a58..bc8c11f13722 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.h +++ b/fs/xfs/linux-2.6/xfs_sysctl.h | |||
| @@ -1,35 +1,20 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2001-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2001-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #ifndef __XFS_SYSCTL_H__ | 18 | #ifndef __XFS_SYSCTL_H__ |
| 34 | #define __XFS_SYSCTL_H__ | 19 | #define __XFS_SYSCTL_H__ |
| 35 | 20 | ||
diff --git a/fs/xfs/linux-2.6/xfs_version.h b/fs/xfs/linux-2.6/xfs_version.h index 96f96394417e..f8d279d7563a 100644 --- a/fs/xfs/linux-2.6/xfs_version.h +++ b/fs/xfs/linux-2.6/xfs_version.h | |||
| @@ -1,34 +1,22 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2001-2002,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 18 | #ifndef __XFS_VERSION_H__ | ||
| 19 | #define __XFS_VERSION_H__ | ||
| 32 | 20 | ||
| 33 | /* | 21 | /* |
| 34 | * Dummy file that can contain a timestamp to put into the | 22 | * Dummy file that can contain a timestamp to put into the |
| @@ -36,9 +24,6 @@ | |||
| 36 | * running | 24 | * running |
| 37 | */ | 25 | */ |
| 38 | 26 | ||
| 39 | #ifndef __XFS_VERSION_H__ | ||
| 40 | #define __XFS_VERSION_H__ | ||
| 41 | |||
| 42 | #define XFS_VERSION_STRING "SGI XFS" | 27 | #define XFS_VERSION_STRING "SGI XFS" |
| 43 | 28 | ||
| 44 | #endif /* __XFS_VERSION_H__ */ | 29 | #endif /* __XFS_VERSION_H__ */ |
diff --git a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c index 34cc902ec119..c855d62e5344 100644 --- a/fs/xfs/linux-2.6/xfs_vfs.c +++ b/fs/xfs/linux-2.6/xfs_vfs.c | |||
| @@ -1,38 +1,22 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include "xfs.h" | 18 | #include "xfs.h" |
| 34 | #include "xfs_fs.h" | 19 | #include "xfs_fs.h" |
| 35 | #include "xfs_macros.h" | ||
| 36 | #include "xfs_inum.h" | 20 | #include "xfs_inum.h" |
| 37 | #include "xfs_log.h" | 21 | #include "xfs_log.h" |
| 38 | #include "xfs_clnt.h" | 22 | #include "xfs_clnt.h" |
diff --git a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h index f0ab574fb47a..57caf9eddee0 100644 --- a/fs/xfs/linux-2.6/xfs_vfs.h +++ b/fs/xfs/linux-2.6/xfs_vfs.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | #ifndef __XFS_VFS_H__ | 18 | #ifndef __XFS_VFS_H__ |
| 33 | #define __XFS_VFS_H__ | 19 | #define __XFS_VFS_H__ |
| @@ -95,6 +81,7 @@ typedef enum { | |||
| 95 | #define VFS_RDONLY 0x0001 /* read-only vfs */ | 81 | #define VFS_RDONLY 0x0001 /* read-only vfs */ |
| 96 | #define VFS_GRPID 0x0002 /* group-ID assigned from directory */ | 82 | #define VFS_GRPID 0x0002 /* group-ID assigned from directory */ |
| 97 | #define VFS_DMI 0x0004 /* filesystem has the DMI enabled */ | 83 | #define VFS_DMI 0x0004 /* filesystem has the DMI enabled */ |
| 84 | #define VFS_32BITINODES 0x0008 /* do not use inums above 32 bits */ | ||
| 98 | #define VFS_END 0x0008 /* max flag */ | 85 | #define VFS_END 0x0008 /* max flag */ |
| 99 | 86 | ||
| 100 | #define SYNC_ATTR 0x0001 /* sync attributes */ | 87 | #define SYNC_ATTR 0x0001 /* sync attributes */ |
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c index 268f45bf6a9a..e9bbcb4d6243 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.c +++ b/fs/xfs/linux-2.6/xfs_vnode.c | |||
| @@ -1,38 +1,22 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | */ | 17 | */ |
| 32 | |||
| 33 | #include "xfs.h" | 18 | #include "xfs.h" |
| 34 | 19 | ||
| 35 | |||
| 36 | uint64_t vn_generation; /* vnode generation number */ | 20 | uint64_t vn_generation; /* vnode generation number */ |
| 37 | DEFINE_SPINLOCK(vnumber_lock); | 21 | DEFINE_SPINLOCK(vnumber_lock); |
| 38 | 22 | ||
| @@ -44,7 +28,6 @@ DEFINE_SPINLOCK(vnumber_lock); | |||
| 44 | #define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC]) | 28 | #define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC]) |
| 45 | STATIC wait_queue_head_t vsync[NVSYNC]; | 29 | STATIC wait_queue_head_t vsync[NVSYNC]; |
| 46 | 30 | ||
| 47 | |||
| 48 | void | 31 | void |
| 49 | vn_init(void) | 32 | vn_init(void) |
| 50 | { | 33 | { |
| @@ -124,6 +107,7 @@ vn_revalidate_core( | |||
| 124 | inode->i_mtime = vap->va_mtime; | 107 | inode->i_mtime = vap->va_mtime; |
| 125 | inode->i_ctime = vap->va_ctime; | 108 | inode->i_ctime = vap->va_ctime; |
| 126 | inode->i_atime = vap->va_atime; | 109 | inode->i_atime = vap->va_atime; |
| 110 | inode->i_blksize = vap->va_blocksize; | ||
| 127 | if (vap->va_xflags & XFS_XFLAG_IMMUTABLE) | 111 | if (vap->va_xflags & XFS_XFLAG_IMMUTABLE) |
| 128 | inode->i_flags |= S_IMMUTABLE; | 112 | inode->i_flags |= S_IMMUTABLE; |
| 129 | else | 113 | else |
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index 35f306cebb87..f2bbb327c081 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h | |||
| @@ -1,33 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 7 | * | 8 | * |
| 8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | ||
| 11 | * | 13 | * |
| 12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
| 13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
| 14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | * otherwise, applies only to this software file. Patent licenses, if | ||
| 16 | * any, provided herein do not apply to combinations of this program with | ||
| 17 | * other software, or any other product whatsoever. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
| 21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
| 24 | * Mountain View, CA 94043, or: | ||
| 25 | * | ||
| 26 | * http://www.sgi.com | ||
| 27 | * | ||
| 28 | * For further information regarding this notice, see: | ||
| 29 | * | ||
| 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
| 31 | * | 17 | * |
| 32 | * Portions Copyright (c) 1989, 1993 | 18 | * Portions Copyright (c) 1989, 1993 |
| 33 | * The Regents of the University of California. All rights reserved. | 19 | * The Regents of the University of California. All rights reserved. |
| @@ -216,11 +202,12 @@ typedef void (*vop_rwunlock_t)(bhv_desc_t *, vrwlock_t); | |||
| 216 | typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int, | 202 | typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int, |
| 217 | struct xfs_iomap *, int *); | 203 | struct xfs_iomap *, int *); |
| 218 | typedef int (*vop_reclaim_t)(bhv_desc_t *); | 204 | typedef int (*vop_reclaim_t)(bhv_desc_t *); |
| 219 | typedef int (*vop_attr_get_t)(bhv_desc_t *, char *, char *, int *, int, | 205 | typedef int (*vop_attr_get_t)(bhv_desc_t *, const char *, char *, int *, |
| 220 | struct cred *); | 206 | int, struct cred *); |
| 221 | typedef int (*vop_attr_set_t)(bhv_desc_t *, char *, char *, int, int, | 207 | typedef int (*vop_attr_set_t)(bhv_desc_t *, const char *, char *, int, |
| 222 | struct cred *); | 208 | int, struct cred *); |
| 223 | typedef int (*vop_attr_remove_t)(bhv_desc_t *, char *, int, struct cred *); | 209 | typedef int (*vop_attr_remove_t)(bhv_desc_t *, const char *, |
| 210 | int, struct cred *); | ||
| 224 | typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int, | 211 | typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int, |
| 225 | struct attrlist_cursor_kern *, struct cred *); | 212 | struct attrlist_cursor_kern *, struct cred *); |
| 226 | typedef void (*vop_link_removed_t)(bhv_desc_t *, vnode_t *, int); | 213 | typedef void (*vop_link_removed_t)(bhv_desc_t *, vnode_t *, int); |
| @@ -566,13 +553,6 @@ static __inline__ void vn_flagclr(struct vnode *vp, uint flag) | |||
| 566 | } | 553 | } |
| 567 | 554 | ||
| 568 | /* | 555 | /* |
| 569 | * Update modify/access/change times on the vnode | ||
| 570 | */ | ||
| 571 | #define VN_MTIMESET(vp, tvp) (LINVFS_GET_IP(vp)->i_mtime = *(tvp)) | ||
| 572 | #define VN_ATIMESET(vp, tvp) (LINVFS_GET_IP(vp)->i_atime = *(tvp)) | ||
| 573 | #define VN_CTIMESET(vp, tvp) (LINVFS_GET_IP(vp)->i_ctime = *(tvp)) | ||
| 574 | |||
| 575 | /* | ||
| 576 | * Dealing with bad inodes | 556 | * Dealing with bad inodes |
| 577 | */ | 557 | */ |
| 578 | static inline void vn_mark_bad(struct vnode *vp) | 558 | static inline void vn_mark_bad(struct vnode *vp) |
| @@ -603,6 +583,7 @@ static inline int VN_BAD(struct vnode *vp) | |||
| 603 | #define ATTR_LAZY 0x80 /* set/get attributes lazily */ | 583 | #define ATTR_LAZY 0x80 /* set/get attributes lazily */ |
| 604 | #define ATTR_NONBLOCK 0x100 /* return EAGAIN if operation would block */ | 584 | #define ATTR_NONBLOCK 0x100 /* return EAGAIN if operation would block */ |
| 605 | #define ATTR_NOLOCK 0x200 /* Don't grab any conflicting locks */ | 585 | #define ATTR_NOLOCK 0x200 /* Don't grab any conflicting locks */ |
| 586 | #define ATTR_NOSIZETOK 0x400 /* Don't get the SIZE token */ | ||
| 606 | 587 | ||
| 607 | /* | 588 | /* |
| 608 | * Flags to VOP_FSYNC and VOP_RECLAIM. | 589 | * Flags to VOP_FSYNC and VOP_RECLAIM. |
