diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-02-27 14:07:10 -0500 |
---|---|---|
committer | Christoph Lameter <clameter@sgi.com> | 2008-02-27 14:07:10 -0500 |
commit | 9ef64cb4320df821638b508f79aa8b858cca99f0 (patch) | |
tree | 4efbf0854234f89c6f4413077ec795fc669b5b0a /fs/xfs | |
parent | 6f157c1d268d5888ca44c589dccd01729c4172f6 (diff) | |
parent | 7704a8b6fc4a8f51599eb2af4dcf1e2ac9c7e576 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/Kbuild | 6 | ||||
-rw-r--r-- | fs/xfs/Makefile | 118 | ||||
-rw-r--r-- | fs/xfs/Makefile-linux-2.6 | 117 | ||||
-rw-r--r-- | fs/xfs/xfs_bit.c | 103 | ||||
-rw-r--r-- | fs/xfs/xfs_bit.h | 27 | ||||
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 19 |
6 files changed, 237 insertions, 153 deletions
diff --git a/fs/xfs/Kbuild b/fs/xfs/Kbuild deleted file mode 100644 index 2566e96706f1..000000000000 --- a/fs/xfs/Kbuild +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # | ||
2 | # The xfs people like to share Makefile with 2.6 and 2.4. | ||
3 | # Utilise file named Kbuild file which has precedence over Makefile. | ||
4 | # | ||
5 | |||
6 | include $(srctree)/$(obj)/Makefile-linux-2.6 | ||
diff --git a/fs/xfs/Makefile b/fs/xfs/Makefile index 49e3e7e5e3dc..36ec614e699a 100644 --- a/fs/xfs/Makefile +++ b/fs/xfs/Makefile | |||
@@ -1 +1,117 @@ | |||
1 | include $(TOPDIR)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL) | 1 | # |
2 | # Copyright (c) 2000-2005 Silicon Graphics, Inc. | ||
3 | # All Rights Reserved. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or | ||
6 | # modify it under the terms of the GNU General Public License as | ||
7 | # published by the Free Software Foundation. | ||
8 | # | ||
9 | # This program is distributed in the hope that it would be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | # GNU General Public License for more details. | ||
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 | ||
17 | # | ||
18 | |||
19 | EXTRA_CFLAGS += -I$(src) -I$(src)/linux-2.6 -funsigned-char | ||
20 | |||
21 | XFS_LINUX := linux-2.6 | ||
22 | |||
23 | ifeq ($(CONFIG_XFS_DEBUG),y) | ||
24 | EXTRA_CFLAGS += -g | ||
25 | endif | ||
26 | |||
27 | obj-$(CONFIG_XFS_FS) += xfs.o | ||
28 | |||
29 | xfs-$(CONFIG_XFS_QUOTA) += $(addprefix quota/, \ | ||
30 | xfs_dquot.o \ | ||
31 | xfs_dquot_item.o \ | ||
32 | xfs_trans_dquot.o \ | ||
33 | xfs_qm_syscalls.o \ | ||
34 | xfs_qm_bhv.o \ | ||
35 | xfs_qm.o) | ||
36 | |||
37 | ifeq ($(CONFIG_XFS_QUOTA),y) | ||
38 | xfs-$(CONFIG_PROC_FS) += quota/xfs_qm_stats.o | ||
39 | endif | ||
40 | |||
41 | xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o | ||
42 | xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o | ||
43 | xfs-$(CONFIG_PROC_FS) += $(XFS_LINUX)/xfs_stats.o | ||
44 | xfs-$(CONFIG_SYSCTL) += $(XFS_LINUX)/xfs_sysctl.o | ||
45 | xfs-$(CONFIG_COMPAT) += $(XFS_LINUX)/xfs_ioctl32.o | ||
46 | |||
47 | |||
48 | xfs-y += xfs_alloc.o \ | ||
49 | xfs_alloc_btree.o \ | ||
50 | xfs_attr.o \ | ||
51 | xfs_attr_leaf.o \ | ||
52 | xfs_bit.o \ | ||
53 | xfs_bmap.o \ | ||
54 | xfs_bmap_btree.o \ | ||
55 | xfs_btree.o \ | ||
56 | xfs_buf_item.o \ | ||
57 | xfs_da_btree.o \ | ||
58 | xfs_dir2.o \ | ||
59 | xfs_dir2_block.o \ | ||
60 | xfs_dir2_data.o \ | ||
61 | xfs_dir2_leaf.o \ | ||
62 | xfs_dir2_node.o \ | ||
63 | xfs_dir2_sf.o \ | ||
64 | xfs_error.o \ | ||
65 | xfs_extfree_item.o \ | ||
66 | xfs_filestream.o \ | ||
67 | xfs_fsops.o \ | ||
68 | xfs_ialloc.o \ | ||
69 | xfs_ialloc_btree.o \ | ||
70 | xfs_iget.o \ | ||
71 | xfs_inode.o \ | ||
72 | xfs_inode_item.o \ | ||
73 | xfs_iomap.o \ | ||
74 | xfs_itable.o \ | ||
75 | xfs_dfrag.o \ | ||
76 | xfs_log.o \ | ||
77 | xfs_log_recover.o \ | ||
78 | xfs_mount.o \ | ||
79 | xfs_mru_cache.o \ | ||
80 | xfs_rename.o \ | ||
81 | xfs_trans.o \ | ||
82 | xfs_trans_ail.o \ | ||
83 | xfs_trans_buf.o \ | ||
84 | xfs_trans_extfree.o \ | ||
85 | xfs_trans_inode.o \ | ||
86 | xfs_trans_item.o \ | ||
87 | xfs_utils.o \ | ||
88 | xfs_vfsops.o \ | ||
89 | xfs_vnodeops.o \ | ||
90 | xfs_rw.o \ | ||
91 | xfs_dmops.o \ | ||
92 | xfs_qmops.o | ||
93 | |||
94 | xfs-$(CONFIG_XFS_TRACE) += xfs_dir2_trace.o | ||
95 | |||
96 | # Objects in linux/ | ||
97 | xfs-y += $(addprefix $(XFS_LINUX)/, \ | ||
98 | kmem.o \ | ||
99 | xfs_aops.o \ | ||
100 | xfs_buf.o \ | ||
101 | xfs_export.o \ | ||
102 | xfs_file.o \ | ||
103 | xfs_fs_subr.o \ | ||
104 | xfs_globals.o \ | ||
105 | xfs_ioctl.o \ | ||
106 | xfs_iops.o \ | ||
107 | xfs_lrw.o \ | ||
108 | xfs_super.o \ | ||
109 | xfs_vnode.o) | ||
110 | |||
111 | # Objects in support/ | ||
112 | xfs-y += $(addprefix support/, \ | ||
113 | debug.o \ | ||
114 | uuid.o) | ||
115 | |||
116 | xfs-$(CONFIG_XFS_TRACE) += support/ktrace.o | ||
117 | |||
diff --git a/fs/xfs/Makefile-linux-2.6 b/fs/xfs/Makefile-linux-2.6 deleted file mode 100644 index 97316451fc6d..000000000000 --- a/fs/xfs/Makefile-linux-2.6 +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | # | ||
2 | # Copyright (c) 2000-2005 Silicon Graphics, Inc. | ||
3 | # All Rights Reserved. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or | ||
6 | # modify it under the terms of the GNU General Public License as | ||
7 | # published by the Free Software Foundation. | ||
8 | # | ||
9 | # This program is distributed in the hope that it would be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | # GNU General Public License for more details. | ||
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 | ||
17 | # | ||
18 | |||
19 | EXTRA_CFLAGS += -Ifs/xfs -Ifs/xfs/linux-2.6 -funsigned-char | ||
20 | |||
21 | XFS_LINUX := linux-2.6 | ||
22 | |||
23 | ifeq ($(CONFIG_XFS_DEBUG),y) | ||
24 | EXTRA_CFLAGS += -g | ||
25 | endif | ||
26 | |||
27 | obj-$(CONFIG_XFS_FS) += xfs.o | ||
28 | |||
29 | xfs-$(CONFIG_XFS_QUOTA) += $(addprefix quota/, \ | ||
30 | xfs_dquot.o \ | ||
31 | xfs_dquot_item.o \ | ||
32 | xfs_trans_dquot.o \ | ||
33 | xfs_qm_syscalls.o \ | ||
34 | xfs_qm_bhv.o \ | ||
35 | xfs_qm.o) | ||
36 | |||
37 | ifeq ($(CONFIG_XFS_QUOTA),y) | ||
38 | xfs-$(CONFIG_PROC_FS) += quota/xfs_qm_stats.o | ||
39 | endif | ||
40 | |||
41 | xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o | ||
42 | xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o | ||
43 | xfs-$(CONFIG_PROC_FS) += $(XFS_LINUX)/xfs_stats.o | ||
44 | xfs-$(CONFIG_SYSCTL) += $(XFS_LINUX)/xfs_sysctl.o | ||
45 | xfs-$(CONFIG_COMPAT) += $(XFS_LINUX)/xfs_ioctl32.o | ||
46 | |||
47 | |||
48 | xfs-y += xfs_alloc.o \ | ||
49 | xfs_alloc_btree.o \ | ||
50 | xfs_attr.o \ | ||
51 | xfs_attr_leaf.o \ | ||
52 | xfs_bit.o \ | ||
53 | xfs_bmap.o \ | ||
54 | xfs_bmap_btree.o \ | ||
55 | xfs_btree.o \ | ||
56 | xfs_buf_item.o \ | ||
57 | xfs_da_btree.o \ | ||
58 | xfs_dir2.o \ | ||
59 | xfs_dir2_block.o \ | ||
60 | xfs_dir2_data.o \ | ||
61 | xfs_dir2_leaf.o \ | ||
62 | xfs_dir2_node.o \ | ||
63 | xfs_dir2_sf.o \ | ||
64 | xfs_error.o \ | ||
65 | xfs_extfree_item.o \ | ||
66 | xfs_filestream.o \ | ||
67 | xfs_fsops.o \ | ||
68 | xfs_ialloc.o \ | ||
69 | xfs_ialloc_btree.o \ | ||
70 | xfs_iget.o \ | ||
71 | xfs_inode.o \ | ||
72 | xfs_inode_item.o \ | ||
73 | xfs_iomap.o \ | ||
74 | xfs_itable.o \ | ||
75 | xfs_dfrag.o \ | ||
76 | xfs_log.o \ | ||
77 | xfs_log_recover.o \ | ||
78 | xfs_mount.o \ | ||
79 | xfs_mru_cache.o \ | ||
80 | xfs_rename.o \ | ||
81 | xfs_trans.o \ | ||
82 | xfs_trans_ail.o \ | ||
83 | xfs_trans_buf.o \ | ||
84 | xfs_trans_extfree.o \ | ||
85 | xfs_trans_inode.o \ | ||
86 | xfs_trans_item.o \ | ||
87 | xfs_utils.o \ | ||
88 | xfs_vfsops.o \ | ||
89 | xfs_vnodeops.o \ | ||
90 | xfs_rw.o \ | ||
91 | xfs_dmops.o \ | ||
92 | xfs_qmops.o | ||
93 | |||
94 | xfs-$(CONFIG_XFS_TRACE) += xfs_dir2_trace.o | ||
95 | |||
96 | # Objects in linux/ | ||
97 | xfs-y += $(addprefix $(XFS_LINUX)/, \ | ||
98 | kmem.o \ | ||
99 | xfs_aops.o \ | ||
100 | xfs_buf.o \ | ||
101 | xfs_export.o \ | ||
102 | xfs_file.o \ | ||
103 | xfs_fs_subr.o \ | ||
104 | xfs_globals.o \ | ||
105 | xfs_ioctl.o \ | ||
106 | xfs_iops.o \ | ||
107 | xfs_lrw.o \ | ||
108 | xfs_super.o \ | ||
109 | xfs_vnode.o) | ||
110 | |||
111 | # Objects in support/ | ||
112 | xfs-y += $(addprefix support/, \ | ||
113 | debug.o \ | ||
114 | uuid.o) | ||
115 | |||
116 | xfs-$(CONFIG_XFS_TRACE) += support/ktrace.o | ||
117 | |||
diff --git a/fs/xfs/xfs_bit.c b/fs/xfs/xfs_bit.c index 48228848f5ae..fab0b6d5a41b 100644 --- a/fs/xfs/xfs_bit.c +++ b/fs/xfs/xfs_bit.c | |||
@@ -25,6 +25,109 @@ | |||
25 | * XFS bit manipulation routines, used in non-realtime code. | 25 | * XFS bit manipulation routines, used in non-realtime code. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef HAVE_ARCH_HIGHBIT | ||
29 | /* | ||
30 | * Index of high bit number in byte, -1 for none set, 0..7 otherwise. | ||
31 | */ | ||
32 | static const char xfs_highbit[256] = { | ||
33 | -1, 0, 1, 1, 2, 2, 2, 2, /* 00 .. 07 */ | ||
34 | 3, 3, 3, 3, 3, 3, 3, 3, /* 08 .. 0f */ | ||
35 | 4, 4, 4, 4, 4, 4, 4, 4, /* 10 .. 17 */ | ||
36 | 4, 4, 4, 4, 4, 4, 4, 4, /* 18 .. 1f */ | ||
37 | 5, 5, 5, 5, 5, 5, 5, 5, /* 20 .. 27 */ | ||
38 | 5, 5, 5, 5, 5, 5, 5, 5, /* 28 .. 2f */ | ||
39 | 5, 5, 5, 5, 5, 5, 5, 5, /* 30 .. 37 */ | ||
40 | 5, 5, 5, 5, 5, 5, 5, 5, /* 38 .. 3f */ | ||
41 | 6, 6, 6, 6, 6, 6, 6, 6, /* 40 .. 47 */ | ||
42 | 6, 6, 6, 6, 6, 6, 6, 6, /* 48 .. 4f */ | ||
43 | 6, 6, 6, 6, 6, 6, 6, 6, /* 50 .. 57 */ | ||
44 | 6, 6, 6, 6, 6, 6, 6, 6, /* 58 .. 5f */ | ||
45 | 6, 6, 6, 6, 6, 6, 6, 6, /* 60 .. 67 */ | ||
46 | 6, 6, 6, 6, 6, 6, 6, 6, /* 68 .. 6f */ | ||
47 | 6, 6, 6, 6, 6, 6, 6, 6, /* 70 .. 77 */ | ||
48 | 6, 6, 6, 6, 6, 6, 6, 6, /* 78 .. 7f */ | ||
49 | 7, 7, 7, 7, 7, 7, 7, 7, /* 80 .. 87 */ | ||
50 | 7, 7, 7, 7, 7, 7, 7, 7, /* 88 .. 8f */ | ||
51 | 7, 7, 7, 7, 7, 7, 7, 7, /* 90 .. 97 */ | ||
52 | 7, 7, 7, 7, 7, 7, 7, 7, /* 98 .. 9f */ | ||
53 | 7, 7, 7, 7, 7, 7, 7, 7, /* a0 .. a7 */ | ||
54 | 7, 7, 7, 7, 7, 7, 7, 7, /* a8 .. af */ | ||
55 | 7, 7, 7, 7, 7, 7, 7, 7, /* b0 .. b7 */ | ||
56 | 7, 7, 7, 7, 7, 7, 7, 7, /* b8 .. bf */ | ||
57 | 7, 7, 7, 7, 7, 7, 7, 7, /* c0 .. c7 */ | ||
58 | 7, 7, 7, 7, 7, 7, 7, 7, /* c8 .. cf */ | ||
59 | 7, 7, 7, 7, 7, 7, 7, 7, /* d0 .. d7 */ | ||
60 | 7, 7, 7, 7, 7, 7, 7, 7, /* d8 .. df */ | ||
61 | 7, 7, 7, 7, 7, 7, 7, 7, /* e0 .. e7 */ | ||
62 | 7, 7, 7, 7, 7, 7, 7, 7, /* e8 .. ef */ | ||
63 | 7, 7, 7, 7, 7, 7, 7, 7, /* f0 .. f7 */ | ||
64 | 7, 7, 7, 7, 7, 7, 7, 7, /* f8 .. ff */ | ||
65 | }; | ||
66 | #endif | ||
67 | |||
68 | /* | ||
69 | * xfs_highbit32: get high bit set out of 32-bit argument, -1 if none set. | ||
70 | */ | ||
71 | inline int | ||
72 | xfs_highbit32( | ||
73 | __uint32_t v) | ||
74 | { | ||
75 | #ifdef HAVE_ARCH_HIGHBIT | ||
76 | return highbit32(v); | ||
77 | #else | ||
78 | int i; | ||
79 | |||
80 | if (v & 0xffff0000) | ||
81 | if (v & 0xff000000) | ||
82 | i = 24; | ||
83 | else | ||
84 | i = 16; | ||
85 | else if (v & 0x0000ffff) | ||
86 | if (v & 0x0000ff00) | ||
87 | i = 8; | ||
88 | else | ||
89 | i = 0; | ||
90 | else | ||
91 | return -1; | ||
92 | return i + xfs_highbit[(v >> i) & 0xff]; | ||
93 | #endif | ||
94 | } | ||
95 | |||
96 | /* | ||
97 | * xfs_lowbit64: get low bit set out of 64-bit argument, -1 if none set. | ||
98 | */ | ||
99 | int | ||
100 | xfs_lowbit64( | ||
101 | __uint64_t v) | ||
102 | { | ||
103 | __uint32_t w = (__uint32_t)v; | ||
104 | int n = 0; | ||
105 | |||
106 | if (w) { /* lower bits */ | ||
107 | n = ffs(w); | ||
108 | } else { /* upper bits */ | ||
109 | w = (__uint32_t)(v >> 32); | ||
110 | if (w && (n = ffs(w))) | ||
111 | n += 32; | ||
112 | } | ||
113 | return n - 1; | ||
114 | } | ||
115 | |||
116 | /* | ||
117 | * xfs_highbit64: get high bit set out of 64-bit argument, -1 if none set. | ||
118 | */ | ||
119 | int | ||
120 | xfs_highbit64( | ||
121 | __uint64_t v) | ||
122 | { | ||
123 | __uint32_t h = (__uint32_t)(v >> 32); | ||
124 | |||
125 | if (h) | ||
126 | return xfs_highbit32(h) + 32; | ||
127 | return xfs_highbit32((__uint32_t)v); | ||
128 | } | ||
129 | |||
130 | |||
28 | /* | 131 | /* |
29 | * Return whether bitmap is empty. | 132 | * Return whether bitmap is empty. |
30 | * Size is number of words in the bitmap, which is padded to word boundary | 133 | * Size is number of words in the bitmap, which is padded to word boundary |
diff --git a/fs/xfs/xfs_bit.h b/fs/xfs/xfs_bit.h index 325a007dec91..082641a9782c 100644 --- a/fs/xfs/xfs_bit.h +++ b/fs/xfs/xfs_bit.h | |||
@@ -47,30 +47,13 @@ static inline __uint64_t xfs_mask64lo(int n) | |||
47 | } | 47 | } |
48 | 48 | ||
49 | /* Get high bit set out of 32-bit argument, -1 if none set */ | 49 | /* Get high bit set out of 32-bit argument, -1 if none set */ |
50 | static inline int xfs_highbit32(__uint32_t v) | 50 | extern int xfs_highbit32(__uint32_t v); |
51 | { | ||
52 | return fls(v) - 1; | ||
53 | } | ||
54 | |||
55 | /* Get high bit set out of 64-bit argument, -1 if none set */ | ||
56 | static inline int xfs_highbit64(__uint64_t v) | ||
57 | { | ||
58 | return fls64(v) - 1; | ||
59 | } | ||
60 | |||
61 | /* Get low bit set out of 32-bit argument, -1 if none set */ | ||
62 | static inline int xfs_lowbit32(__uint32_t v) | ||
63 | { | ||
64 | __uint32_t t = v; | ||
65 | return (t) ? find_first_bit((unsigned long *)&t, 32) : -1; | ||
66 | } | ||
67 | 51 | ||
68 | /* Get low bit set out of 64-bit argument, -1 if none set */ | 52 | /* Get low bit set out of 64-bit argument, -1 if none set */ |
69 | static inline int xfs_lowbit64(__uint64_t v) | 53 | extern int xfs_lowbit64(__uint64_t v); |
70 | { | 54 | |
71 | __uint64_t t = v; | 55 | /* Get high bit set out of 64-bit argument, -1 if none set */ |
72 | return (t) ? find_first_bit((unsigned long *)&t, 64) : -1; | 56 | extern int xfs_highbit64(__uint64_t); |
73 | } | ||
74 | 57 | ||
75 | /* Return whether bitmap is empty (1 == empty) */ | 58 | /* Return whether bitmap is empty (1 == empty) */ |
76 | extern int xfs_bitmap_empty(uint *map, uint size); | 59 | extern int xfs_bitmap_empty(uint *map, uint size); |
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index ca83ddf72af4..47082c01872d 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c | |||
@@ -73,6 +73,18 @@ STATIC int xfs_rtmodify_summary(xfs_mount_t *, xfs_trans_t *, int, | |||
73 | */ | 73 | */ |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * xfs_lowbit32: get low bit set out of 32-bit argument, -1 if none set. | ||
77 | */ | ||
78 | STATIC int | ||
79 | xfs_lowbit32( | ||
80 | __uint32_t v) | ||
81 | { | ||
82 | if (v) | ||
83 | return ffs(v) - 1; | ||
84 | return -1; | ||
85 | } | ||
86 | |||
87 | /* | ||
76 | * Allocate space to the bitmap or summary file, and zero it, for growfs. | 88 | * Allocate space to the bitmap or summary file, and zero it, for growfs. |
77 | */ | 89 | */ |
78 | STATIC int /* error */ | 90 | STATIC int /* error */ |
@@ -432,7 +444,6 @@ xfs_rtallocate_extent_near( | |||
432 | } | 444 | } |
433 | bbno = XFS_BITTOBLOCK(mp, bno); | 445 | bbno = XFS_BITTOBLOCK(mp, bno); |
434 | i = 0; | 446 | i = 0; |
435 | ASSERT(minlen != 0); | ||
436 | log2len = xfs_highbit32(minlen); | 447 | log2len = xfs_highbit32(minlen); |
437 | /* | 448 | /* |
438 | * Loop over all bitmap blocks (bbno + i is current block). | 449 | * Loop over all bitmap blocks (bbno + i is current block). |
@@ -601,8 +612,6 @@ xfs_rtallocate_extent_size( | |||
601 | xfs_suminfo_t sum; /* summary information for extents */ | 612 | xfs_suminfo_t sum; /* summary information for extents */ |
602 | 613 | ||
603 | ASSERT(minlen % prod == 0 && maxlen % prod == 0); | 614 | ASSERT(minlen % prod == 0 && maxlen % prod == 0); |
604 | ASSERT(maxlen != 0); | ||
605 | |||
606 | /* | 615 | /* |
607 | * Loop over all the levels starting with maxlen. | 616 | * Loop over all the levels starting with maxlen. |
608 | * At each level, look at all the bitmap blocks, to see if there | 617 | * At each level, look at all the bitmap blocks, to see if there |
@@ -660,9 +669,6 @@ xfs_rtallocate_extent_size( | |||
660 | *rtblock = NULLRTBLOCK; | 669 | *rtblock = NULLRTBLOCK; |
661 | return 0; | 670 | return 0; |
662 | } | 671 | } |
663 | ASSERT(minlen != 0); | ||
664 | ASSERT(maxlen != 0); | ||
665 | |||
666 | /* | 672 | /* |
667 | * Loop over sizes, from maxlen down to minlen. | 673 | * Loop over sizes, from maxlen down to minlen. |
668 | * This time, when we do the allocations, allow smaller ones | 674 | * This time, when we do the allocations, allow smaller ones |
@@ -1948,7 +1954,6 @@ xfs_growfs_rt( | |||
1948 | nsbp->sb_blocksize * nsbp->sb_rextsize); | 1954 | nsbp->sb_blocksize * nsbp->sb_rextsize); |
1949 | nsbp->sb_rextents = nsbp->sb_rblocks; | 1955 | nsbp->sb_rextents = nsbp->sb_rblocks; |
1950 | do_div(nsbp->sb_rextents, nsbp->sb_rextsize); | 1956 | do_div(nsbp->sb_rextents, nsbp->sb_rextsize); |
1951 | ASSERT(nsbp->sb_rextents != 0); | ||
1952 | nsbp->sb_rextslog = xfs_highbit32(nsbp->sb_rextents); | 1957 | nsbp->sb_rextslog = xfs_highbit32(nsbp->sb_rextents); |
1953 | nrsumlevels = nmp->m_rsumlevels = nsbp->sb_rextslog + 1; | 1958 | nrsumlevels = nmp->m_rsumlevels = nsbp->sb_rextslog + 1; |
1954 | nrsumsize = | 1959 | nrsumsize = |