diff options
Diffstat (limited to 'fs')
41 files changed, 508 insertions, 510 deletions
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index e2281300979c..4d84bdc88299 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c | |||
@@ -5,16 +5,16 @@ | |||
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
8 | * the Free Software Foundation; either version 2 of the License, or | 8 | * the Free Software Foundation; either version 2 of the License, or |
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | * | 10 | * |
11 | * This program is distributed in the hope that it will be useful, | 11 | * This program is distributed in the hope that it will be useful, |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
14 | * the GNU General Public License for more details. | 14 | * the GNU General Public License for more details. |
15 | * | 15 | * |
16 | * You should have received a copy of the GNU General Public License | 16 | * You should have received a copy of the GNU General Public License |
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
@@ -183,7 +183,7 @@ cleanup: | |||
183 | posix_acl_release(acl); | 183 | posix_acl_release(acl); |
184 | } else | 184 | } else |
185 | inode->i_mode &= ~current->fs->umask; | 185 | inode->i_mode &= ~current->fs->umask; |
186 | 186 | ||
187 | JFS_IP(inode)->mode2 = (JFS_IP(inode)->mode2 & 0xffff0000) | | 187 | JFS_IP(inode)->mode2 = (JFS_IP(inode)->mode2 & 0xffff0000) | |
188 | inode->i_mode; | 188 | inode->i_mode; |
189 | 189 | ||
diff --git a/fs/jfs/endian24.h b/fs/jfs/endian24.h index ab7cd0567c95..79494c4f2b10 100644 --- a/fs/jfs/endian24.h +++ b/fs/jfs/endian24.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2001 | 2 | * Copyright (C) International Business Machines Corp., 2001 |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
diff --git a/fs/jfs/file.c b/fs/jfs/file.c index 976e90dc2d1b..34181b8f5a0a 100644 --- a/fs/jfs/file.c +++ b/fs/jfs/file.c | |||
@@ -4,16 +4,16 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
@@ -108,7 +108,7 @@ const struct file_operations jfs_file_operations = { | |||
108 | .aio_read = generic_file_aio_read, | 108 | .aio_read = generic_file_aio_read, |
109 | .aio_write = generic_file_aio_write, | 109 | .aio_write = generic_file_aio_write, |
110 | .mmap = generic_file_mmap, | 110 | .mmap = generic_file_mmap, |
111 | .sendfile = generic_file_sendfile, | 111 | .sendfile = generic_file_sendfile, |
112 | .fsync = jfs_fsync, | 112 | .fsync = jfs_fsync, |
113 | .release = jfs_release, | 113 | .release = jfs_release, |
114 | .ioctl = jfs_ioctl, | 114 | .ioctl = jfs_ioctl, |
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index a8cc169235d9..f5719117edfe 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c | |||
@@ -4,16 +4,16 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | void jfs_read_inode(struct inode *inode) | 34 | void jfs_read_inode(struct inode *inode) |
35 | { | 35 | { |
36 | if (diRead(inode)) { | 36 | if (diRead(inode)) { |
37 | make_bad_inode(inode); | 37 | make_bad_inode(inode); |
38 | return; | 38 | return; |
39 | } | 39 | } |
diff --git a/fs/jfs/jfs_acl.h b/fs/jfs/jfs_acl.h index a76293767c73..455fa4292045 100644 --- a/fs/jfs/jfs_acl.h +++ b/fs/jfs/jfs_acl.h | |||
@@ -1,18 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2002 | 2 | * Copyright (C) International Business Machines Corp., 2002 |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_ACL | 18 | #ifndef _H_JFS_ACL |
diff --git a/fs/jfs/jfs_btree.h b/fs/jfs/jfs_btree.h index 7f3e9ac454ff..79c61805bd33 100644 --- a/fs/jfs/jfs_btree.h +++ b/fs/jfs/jfs_btree.h | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_BTREE | 18 | #ifndef _H_JFS_BTREE |
diff --git a/fs/jfs/jfs_debug.c b/fs/jfs/jfs_debug.c index 81f0e514c490..9c5d59632aac 100644 --- a/fs/jfs/jfs_debug.c +++ b/fs/jfs/jfs_debug.c | |||
@@ -4,16 +4,16 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
diff --git a/fs/jfs/jfs_dinode.h b/fs/jfs/jfs_dinode.h index 9f2572aea561..40b20111383c 100644 --- a/fs/jfs/jfs_dinode.h +++ b/fs/jfs/jfs_dinode.h | |||
@@ -1,18 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2000-2001 | 2 | * Copyright (C) International Business Machines Corp., 2000-2001 |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_DINODE | 18 | #ifndef _H_JFS_DINODE |
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index f05ebb629182..23546c8fd48b 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
@@ -30,28 +30,28 @@ | |||
30 | * | 30 | * |
31 | * the working state of the block allocation map is accessed in | 31 | * the working state of the block allocation map is accessed in |
32 | * two directions: | 32 | * two directions: |
33 | * | 33 | * |
34 | * 1) allocation and free requests that start at the dmap | 34 | * 1) allocation and free requests that start at the dmap |
35 | * level and move up through the dmap control pages (i.e. | 35 | * level and move up through the dmap control pages (i.e. |
36 | * the vast majority of requests). | 36 | * the vast majority of requests). |
37 | * | 37 | * |
38 | * 2) allocation requests that start at dmap control page | 38 | * 2) allocation requests that start at dmap control page |
39 | * level and work down towards the dmaps. | 39 | * level and work down towards the dmaps. |
40 | * | ||
41 | * the serialization scheme used here is as follows. | ||
42 | * | 40 | * |
43 | * requests which start at the bottom are serialized against each | 41 | * the serialization scheme used here is as follows. |
44 | * other through buffers and each requests holds onto its buffers | 42 | * |
45 | * as it works it way up from a single dmap to the required level | 43 | * requests which start at the bottom are serialized against each |
44 | * other through buffers and each requests holds onto its buffers | ||
45 | * as it works it way up from a single dmap to the required level | ||
46 | * of dmap control page. | 46 | * of dmap control page. |
47 | * requests that start at the top are serialized against each other | 47 | * requests that start at the top are serialized against each other |
48 | * and request that start from the bottom by the multiple read/single | 48 | * and request that start from the bottom by the multiple read/single |
49 | * write inode lock of the bmap inode. requests starting at the top | 49 | * write inode lock of the bmap inode. requests starting at the top |
50 | * take this lock in write mode while request starting at the bottom | 50 | * take this lock in write mode while request starting at the bottom |
51 | * take the lock in read mode. a single top-down request may proceed | 51 | * take the lock in read mode. a single top-down request may proceed |
52 | * exclusively while multiple bottoms-up requests may proceed | 52 | * exclusively while multiple bottoms-up requests may proceed |
53 | * simultaneously (under the protection of busy buffers). | 53 | * simultaneously (under the protection of busy buffers). |
54 | * | 54 | * |
55 | * in addition to information found in dmaps and dmap control pages, | 55 | * in addition to information found in dmaps and dmap control pages, |
56 | * the working state of the block allocation map also includes read/ | 56 | * the working state of the block allocation map also includes read/ |
57 | * write information maintained in the bmap descriptor (i.e. total | 57 | * write information maintained in the bmap descriptor (i.e. total |
@@ -59,7 +59,7 @@ | |||
59 | * a single exclusive lock (BMAP_LOCK) is used to guard this information | 59 | * a single exclusive lock (BMAP_LOCK) is used to guard this information |
60 | * in the face of multiple-bottoms up requests. | 60 | * in the face of multiple-bottoms up requests. |
61 | * (lock ordering: IREAD_LOCK, BMAP_LOCK); | 61 | * (lock ordering: IREAD_LOCK, BMAP_LOCK); |
62 | * | 62 | * |
63 | * accesses to the persistent state of the block allocation map (limited | 63 | * accesses to the persistent state of the block allocation map (limited |
64 | * to the persistent bitmaps in dmaps) is guarded by (busy) buffers. | 64 | * to the persistent bitmaps in dmaps) is guarded by (busy) buffers. |
65 | */ | 65 | */ |
@@ -120,7 +120,7 @@ static int dbGetL2AGSize(s64 nblocks); | |||
120 | /* | 120 | /* |
121 | * buddy table | 121 | * buddy table |
122 | * | 122 | * |
123 | * table used for determining buddy sizes within characters of | 123 | * table used for determining buddy sizes within characters of |
124 | * dmap bitmap words. the characters themselves serve as indexes | 124 | * dmap bitmap words. the characters themselves serve as indexes |
125 | * into the table, with the table elements yielding the maximum | 125 | * into the table, with the table elements yielding the maximum |
126 | * binary buddy of free bits within the character. | 126 | * binary buddy of free bits within the character. |
@@ -146,7 +146,7 @@ static const s8 budtab[256] = { | |||
146 | 146 | ||
147 | 147 | ||
148 | /* | 148 | /* |
149 | * NAME: dbMount() | 149 | * NAME: dbMount() |
150 | * | 150 | * |
151 | * FUNCTION: initializate the block allocation map. | 151 | * FUNCTION: initializate the block allocation map. |
152 | * | 152 | * |
@@ -223,12 +223,12 @@ int dbMount(struct inode *ipbmap) | |||
223 | 223 | ||
224 | 224 | ||
225 | /* | 225 | /* |
226 | * NAME: dbUnmount() | 226 | * NAME: dbUnmount() |
227 | * | 227 | * |
228 | * FUNCTION: terminate the block allocation map in preparation for | 228 | * FUNCTION: terminate the block allocation map in preparation for |
229 | * file system unmount. | 229 | * file system unmount. |
230 | * | 230 | * |
231 | * the in-core bmap descriptor is written to disk and | 231 | * the in-core bmap descriptor is written to disk and |
232 | * the memory for this descriptor is freed. | 232 | * the memory for this descriptor is freed. |
233 | * | 233 | * |
234 | * PARAMETERS: | 234 | * PARAMETERS: |
@@ -311,7 +311,7 @@ int dbSync(struct inode *ipbmap) | |||
311 | 311 | ||
312 | 312 | ||
313 | /* | 313 | /* |
314 | * NAME: dbFree() | 314 | * NAME: dbFree() |
315 | * | 315 | * |
316 | * FUNCTION: free the specified block range from the working block | 316 | * FUNCTION: free the specified block range from the working block |
317 | * allocation map. | 317 | * allocation map. |
@@ -397,7 +397,7 @@ int dbFree(struct inode *ip, s64 blkno, s64 nblocks) | |||
397 | * | 397 | * |
398 | * FUNCTION: update the allocation state (free or allocate) of the | 398 | * FUNCTION: update the allocation state (free or allocate) of the |
399 | * specified block range in the persistent block allocation map. | 399 | * specified block range in the persistent block allocation map. |
400 | * | 400 | * |
401 | * the blocks will be updated in the persistent map one | 401 | * the blocks will be updated in the persistent map one |
402 | * dmap at a time. | 402 | * dmap at a time. |
403 | * | 403 | * |
@@ -475,7 +475,7 @@ dbUpdatePMap(struct inode *ipbmap, | |||
475 | /* update the bits of the dmap words. the first and last | 475 | /* update the bits of the dmap words. the first and last |
476 | * words may only have a subset of their bits updated. if | 476 | * words may only have a subset of their bits updated. if |
477 | * this is the case, we'll work against that word (i.e. | 477 | * this is the case, we'll work against that word (i.e. |
478 | * partial first and/or last) only in a single pass. a | 478 | * partial first and/or last) only in a single pass. a |
479 | * single pass will also be used to update all words that | 479 | * single pass will also be used to update all words that |
480 | * are to have all their bits updated. | 480 | * are to have all their bits updated. |
481 | */ | 481 | */ |
@@ -662,11 +662,11 @@ unlock: | |||
662 | * the block allocation policy uses hints and a multi-step | 662 | * the block allocation policy uses hints and a multi-step |
663 | * approach. | 663 | * approach. |
664 | * | 664 | * |
665 | * for allocation requests smaller than the number of blocks | 665 | * for allocation requests smaller than the number of blocks |
666 | * per dmap, we first try to allocate the new blocks | 666 | * per dmap, we first try to allocate the new blocks |
667 | * immediately following the hint. if these blocks are not | 667 | * immediately following the hint. if these blocks are not |
668 | * available, we try to allocate blocks near the hint. if | 668 | * available, we try to allocate blocks near the hint. if |
669 | * no blocks near the hint are available, we next try to | 669 | * no blocks near the hint are available, we next try to |
670 | * allocate within the same dmap as contains the hint. | 670 | * allocate within the same dmap as contains the hint. |
671 | * | 671 | * |
672 | * if no blocks are available in the dmap or the allocation | 672 | * if no blocks are available in the dmap or the allocation |
@@ -713,7 +713,7 @@ int dbAlloc(struct inode *ip, s64 hint, s64 nblocks, s64 * results) | |||
713 | #endif /* _STILL_TO_PORT */ | 713 | #endif /* _STILL_TO_PORT */ |
714 | 714 | ||
715 | /* get the log2 number of blocks to be allocated. | 715 | /* get the log2 number of blocks to be allocated. |
716 | * if the number of blocks is not a log2 multiple, | 716 | * if the number of blocks is not a log2 multiple, |
717 | * it will be rounded up to the next log2 multiple. | 717 | * it will be rounded up to the next log2 multiple. |
718 | */ | 718 | */ |
719 | l2nb = BLKSTOL2(nblocks); | 719 | l2nb = BLKSTOL2(nblocks); |
@@ -906,7 +906,7 @@ int dbAllocExact(struct inode *ip, s64 blkno, int nblocks) | |||
906 | * validate extent request: | 906 | * validate extent request: |
907 | * | 907 | * |
908 | * note: defragfs policy: | 908 | * note: defragfs policy: |
909 | * max 64 blocks will be moved. | 909 | * max 64 blocks will be moved. |
910 | * allocation request size must be satisfied from a single dmap. | 910 | * allocation request size must be satisfied from a single dmap. |
911 | */ | 911 | */ |
912 | if (nblocks <= 0 || nblocks > BPERDMAP || blkno >= bmp->db_mapsize) { | 912 | if (nblocks <= 0 || nblocks > BPERDMAP || blkno >= bmp->db_mapsize) { |
@@ -1333,7 +1333,7 @@ dbAllocNear(struct bmap * bmp, | |||
1333 | * or two sub-trees, depending on the allocation group size. | 1333 | * or two sub-trees, depending on the allocation group size. |
1334 | * we search the top nodes of these subtrees left to right for | 1334 | * we search the top nodes of these subtrees left to right for |
1335 | * sufficient free space. if sufficient free space is found, | 1335 | * sufficient free space. if sufficient free space is found, |
1336 | * the subtree is searched to find the leftmost leaf that | 1336 | * the subtree is searched to find the leftmost leaf that |
1337 | * has free space. once we have made it to the leaf, we | 1337 | * has free space. once we have made it to the leaf, we |
1338 | * move the search to the next lower level dmap control page | 1338 | * move the search to the next lower level dmap control page |
1339 | * corresponding to this leaf. we continue down the dmap control | 1339 | * corresponding to this leaf. we continue down the dmap control |
@@ -1398,7 +1398,7 @@ dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results) | |||
1398 | * that fully describes the allocation group since the allocation | 1398 | * that fully describes the allocation group since the allocation |
1399 | * group is already fully described by a dmap. in this case, we | 1399 | * group is already fully described by a dmap. in this case, we |
1400 | * just call dbAllocCtl() to search the dmap tree and allocate the | 1400 | * just call dbAllocCtl() to search the dmap tree and allocate the |
1401 | * required space if available. | 1401 | * required space if available. |
1402 | * | 1402 | * |
1403 | * if the allocation group is completely free, dbAllocCtl() is | 1403 | * if the allocation group is completely free, dbAllocCtl() is |
1404 | * also called to allocate the required space. this is done for | 1404 | * also called to allocate the required space. this is done for |
@@ -1450,7 +1450,7 @@ dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results) | |||
1450 | (1 << (L2LPERCTL - (bmp->db_agheigth << 1))) / bmp->db_agwidth; | 1450 | (1 << (L2LPERCTL - (bmp->db_agheigth << 1))) / bmp->db_agwidth; |
1451 | ti = bmp->db_agstart + bmp->db_agwidth * (agno & (agperlev - 1)); | 1451 | ti = bmp->db_agstart + bmp->db_agwidth * (agno & (agperlev - 1)); |
1452 | 1452 | ||
1453 | /* dmap control page trees fan-out by 4 and a single allocation | 1453 | /* dmap control page trees fan-out by 4 and a single allocation |
1454 | * group may be described by 1 or 2 subtrees within the ag level | 1454 | * group may be described by 1 or 2 subtrees within the ag level |
1455 | * dmap control page, depending upon the ag size. examine the ag's | 1455 | * dmap control page, depending upon the ag size. examine the ag's |
1456 | * subtrees for sufficient free space, starting with the leftmost | 1456 | * subtrees for sufficient free space, starting with the leftmost |
@@ -1633,7 +1633,7 @@ static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno) | |||
1633 | 1633 | ||
1634 | /* starting at the specified dmap control page level and block | 1634 | /* starting at the specified dmap control page level and block |
1635 | * number, search down the dmap control levels for the starting | 1635 | * number, search down the dmap control levels for the starting |
1636 | * block number of a dmap page that contains or starts off | 1636 | * block number of a dmap page that contains or starts off |
1637 | * sufficient free blocks. | 1637 | * sufficient free blocks. |
1638 | */ | 1638 | */ |
1639 | for (lev = level, b = *blkno; lev >= 0; lev--) { | 1639 | for (lev = level, b = *blkno; lev >= 0; lev--) { |
@@ -1677,7 +1677,7 @@ static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno) | |||
1677 | } | 1677 | } |
1678 | 1678 | ||
1679 | /* adjust the block number to reflect the location within | 1679 | /* adjust the block number to reflect the location within |
1680 | * the dmap control page (i.e. the leaf) at which free | 1680 | * the dmap control page (i.e. the leaf) at which free |
1681 | * space was found. | 1681 | * space was found. |
1682 | */ | 1682 | */ |
1683 | b += (((s64) leafidx) << budmin); | 1683 | b += (((s64) leafidx) << budmin); |
@@ -1700,12 +1700,12 @@ static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno) | |||
1700 | * NAME: dbAllocCtl() | 1700 | * NAME: dbAllocCtl() |
1701 | * | 1701 | * |
1702 | * FUNCTION: attempt to allocate a specified number of contiguous | 1702 | * FUNCTION: attempt to allocate a specified number of contiguous |
1703 | * blocks starting within a specific dmap. | 1703 | * blocks starting within a specific dmap. |
1704 | * | 1704 | * |
1705 | * this routine is called by higher level routines that search | 1705 | * this routine is called by higher level routines that search |
1706 | * the dmap control pages above the actual dmaps for contiguous | 1706 | * the dmap control pages above the actual dmaps for contiguous |
1707 | * free space. the result of successful searches by these | 1707 | * free space. the result of successful searches by these |
1708 | * routines are the starting block numbers within dmaps, with | 1708 | * routines are the starting block numbers within dmaps, with |
1709 | * the dmaps themselves containing the desired contiguous free | 1709 | * the dmaps themselves containing the desired contiguous free |
1710 | * space or starting a contiguous free space of desired size | 1710 | * space or starting a contiguous free space of desired size |
1711 | * that is made up of the blocks of one or more dmaps. these | 1711 | * that is made up of the blocks of one or more dmaps. these |
@@ -1872,14 +1872,14 @@ dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results) | |||
1872 | * | 1872 | * |
1873 | * FUNCTION: attempt to allocate a specified number of contiguous blocks | 1873 | * FUNCTION: attempt to allocate a specified number of contiguous blocks |
1874 | * from a specified dmap. | 1874 | * from a specified dmap. |
1875 | * | 1875 | * |
1876 | * this routine checks if the contiguous blocks are available. | 1876 | * this routine checks if the contiguous blocks are available. |
1877 | * if so, nblocks of blocks are allocated; otherwise, ENOSPC is | 1877 | * if so, nblocks of blocks are allocated; otherwise, ENOSPC is |
1878 | * returned. | 1878 | * returned. |
1879 | * | 1879 | * |
1880 | * PARAMETERS: | 1880 | * PARAMETERS: |
1881 | * mp - pointer to bmap descriptor | 1881 | * mp - pointer to bmap descriptor |
1882 | * dp - pointer to dmap to attempt to allocate blocks from. | 1882 | * dp - pointer to dmap to attempt to allocate blocks from. |
1883 | * l2nb - log2 number of contiguous block desired. | 1883 | * l2nb - log2 number of contiguous block desired. |
1884 | * nblocks - actual number of contiguous block desired. | 1884 | * nblocks - actual number of contiguous block desired. |
1885 | * results - on successful return, set to the starting block number | 1885 | * results - on successful return, set to the starting block number |
@@ -1890,7 +1890,7 @@ dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results) | |||
1890 | * -ENOSPC - insufficient disk resources | 1890 | * -ENOSPC - insufficient disk resources |
1891 | * -EIO - i/o error | 1891 | * -EIO - i/o error |
1892 | * | 1892 | * |
1893 | * serialization: IREAD_LOCK(ipbmap), e.g., from dbAlloc(), or | 1893 | * serialization: IREAD_LOCK(ipbmap), e.g., from dbAlloc(), or |
1894 | * IWRITE_LOCK(ipbmap), e.g., dbAllocCtl(), held on entry/exit; | 1894 | * IWRITE_LOCK(ipbmap), e.g., dbAllocCtl(), held on entry/exit; |
1895 | */ | 1895 | */ |
1896 | static int | 1896 | static int |
@@ -2032,7 +2032,7 @@ static int dbFreeDmap(struct bmap * bmp, struct dmap * dp, s64 blkno, | |||
2032 | 2032 | ||
2033 | /* root changed. bubble the change up to the dmap control pages. | 2033 | /* root changed. bubble the change up to the dmap control pages. |
2034 | * if the adjustment of the upper level control pages fails, | 2034 | * if the adjustment of the upper level control pages fails, |
2035 | * backout the deallocation. | 2035 | * backout the deallocation. |
2036 | */ | 2036 | */ |
2037 | if ((rc = dbAdjCtl(bmp, blkno, dp->tree.stree[ROOT], 0, 0))) { | 2037 | if ((rc = dbAdjCtl(bmp, blkno, dp->tree.stree[ROOT], 0, 0))) { |
2038 | word = (blkno & (BPERDMAP - 1)) >> L2DBWORD; | 2038 | word = (blkno & (BPERDMAP - 1)) >> L2DBWORD; |
@@ -2245,7 +2245,7 @@ static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno, | |||
2245 | * words (i.e. partial first and/or last) on an individual basis | 2245 | * words (i.e. partial first and/or last) on an individual basis |
2246 | * (a single pass), freeing the bits of interest by hand and updating | 2246 | * (a single pass), freeing the bits of interest by hand and updating |
2247 | * the leaf corresponding to the dmap word. a single pass will be used | 2247 | * the leaf corresponding to the dmap word. a single pass will be used |
2248 | * for all dmap words fully contained within the specified range. | 2248 | * for all dmap words fully contained within the specified range. |
2249 | * within this pass, the bits of all fully contained dmap words will | 2249 | * within this pass, the bits of all fully contained dmap words will |
2250 | * be marked as free in a single shot and the leaves will be updated. a | 2250 | * be marked as free in a single shot and the leaves will be updated. a |
2251 | * single leaf may describe the free space of multiple dmap words, | 2251 | * single leaf may describe the free space of multiple dmap words, |
@@ -2267,7 +2267,7 @@ static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno, | |||
2267 | */ | 2267 | */ |
2268 | if (nb < DBWORD) { | 2268 | if (nb < DBWORD) { |
2269 | /* free (zero) the appropriate bits within this | 2269 | /* free (zero) the appropriate bits within this |
2270 | * dmap word. | 2270 | * dmap word. |
2271 | */ | 2271 | */ |
2272 | dp->wmap[word] &= | 2272 | dp->wmap[word] &= |
2273 | cpu_to_le32(~(ONES << (DBWORD - nb) | 2273 | cpu_to_le32(~(ONES << (DBWORD - nb) |
@@ -2327,7 +2327,7 @@ static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno, | |||
2327 | 2327 | ||
2328 | BMAP_LOCK(bmp); | 2328 | BMAP_LOCK(bmp); |
2329 | 2329 | ||
2330 | /* update the free count for the allocation group and | 2330 | /* update the free count for the allocation group and |
2331 | * map. | 2331 | * map. |
2332 | */ | 2332 | */ |
2333 | agno = blkno >> bmp->db_agl2size; | 2333 | agno = blkno >> bmp->db_agl2size; |
@@ -2378,7 +2378,7 @@ static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno, | |||
2378 | * or deallocation resulted in the root change. this range | 2378 | * or deallocation resulted in the root change. this range |
2379 | * is respresented by a single leaf of the current dmapctl | 2379 | * is respresented by a single leaf of the current dmapctl |
2380 | * and the leaf will be updated with this value, possibly | 2380 | * and the leaf will be updated with this value, possibly |
2381 | * causing a binary buddy system within the leaves to be | 2381 | * causing a binary buddy system within the leaves to be |
2382 | * split or joined. the update may also cause the dmapctl's | 2382 | * split or joined. the update may also cause the dmapctl's |
2383 | * dmtree to be updated. | 2383 | * dmtree to be updated. |
2384 | * | 2384 | * |
@@ -2590,7 +2590,7 @@ static void dbSplit(dmtree_t * tp, int leafno, int splitsz, int newval) | |||
2590 | } | 2590 | } |
2591 | } | 2591 | } |
2592 | 2592 | ||
2593 | /* adjust the dmap tree to reflect the specified leaf's new | 2593 | /* adjust the dmap tree to reflect the specified leaf's new |
2594 | * value. | 2594 | * value. |
2595 | */ | 2595 | */ |
2596 | dbAdjTree(tp, leafno, newval); | 2596 | dbAdjTree(tp, leafno, newval); |
@@ -2638,7 +2638,7 @@ static int dbBackSplit(dmtree_t * tp, int leafno) | |||
2638 | /* the back split is accomplished by iteratively finding the leaf | 2638 | /* the back split is accomplished by iteratively finding the leaf |
2639 | * that starts the buddy system that contains the specified leaf and | 2639 | * that starts the buddy system that contains the specified leaf and |
2640 | * splitting that system in two. this iteration continues until | 2640 | * splitting that system in two. this iteration continues until |
2641 | * the specified leaf becomes the start of a buddy system. | 2641 | * the specified leaf becomes the start of a buddy system. |
2642 | * | 2642 | * |
2643 | * determine maximum possible l2 size for the specified leaf. | 2643 | * determine maximum possible l2 size for the specified leaf. |
2644 | */ | 2644 | */ |
@@ -2853,7 +2853,7 @@ static void dbAdjTree(dmtree_t * tp, int leafno, int newval) | |||
2853 | * NAME: dbFindLeaf() | 2853 | * NAME: dbFindLeaf() |
2854 | * | 2854 | * |
2855 | * FUNCTION: search a dmtree_t for sufficient free blocks, returning | 2855 | * FUNCTION: search a dmtree_t for sufficient free blocks, returning |
2856 | * the index of a leaf describing the free blocks if | 2856 | * the index of a leaf describing the free blocks if |
2857 | * sufficient free blocks are found. | 2857 | * sufficient free blocks are found. |
2858 | * | 2858 | * |
2859 | * the search starts at the top of the dmtree_t tree and | 2859 | * the search starts at the top of the dmtree_t tree and |
@@ -2869,7 +2869,7 @@ static void dbAdjTree(dmtree_t * tp, int leafno, int newval) | |||
2869 | * | 2869 | * |
2870 | * RETURN VALUES: | 2870 | * RETURN VALUES: |
2871 | * 0 - success | 2871 | * 0 - success |
2872 | * -ENOSPC - insufficient free blocks. | 2872 | * -ENOSPC - insufficient free blocks. |
2873 | */ | 2873 | */ |
2874 | static int dbFindLeaf(dmtree_t * tp, int l2nb, int *leafidx) | 2874 | static int dbFindLeaf(dmtree_t * tp, int l2nb, int *leafidx) |
2875 | { | 2875 | { |
@@ -3090,7 +3090,7 @@ static int blkstol2(s64 nb) | |||
3090 | 3090 | ||
3091 | 3091 | ||
3092 | /* | 3092 | /* |
3093 | * NAME: dbAllocBottomUp() | 3093 | * NAME: dbAllocBottomUp() |
3094 | * | 3094 | * |
3095 | * FUNCTION: alloc the specified block range from the working block | 3095 | * FUNCTION: alloc the specified block range from the working block |
3096 | * allocation map. | 3096 | * allocation map. |
@@ -3241,7 +3241,7 @@ static int dbAllocDmapBU(struct bmap * bmp, struct dmap * dp, s64 blkno, | |||
3241 | BMAP_LOCK(bmp); | 3241 | BMAP_LOCK(bmp); |
3242 | 3242 | ||
3243 | /* if this allocation group is completely free, | 3243 | /* if this allocation group is completely free, |
3244 | * update the highest active allocation group number | 3244 | * update the highest active allocation group number |
3245 | * if this allocation group is the new max. | 3245 | * if this allocation group is the new max. |
3246 | */ | 3246 | */ |
3247 | agno = blkno >> bmp->db_agl2size; | 3247 | agno = blkno >> bmp->db_agl2size; |
@@ -3273,7 +3273,7 @@ static int dbAllocDmapBU(struct bmap * bmp, struct dmap * dp, s64 blkno, | |||
3273 | * NAME: dbExtendFS() | 3273 | * NAME: dbExtendFS() |
3274 | * | 3274 | * |
3275 | * FUNCTION: extend bmap from blkno for nblocks; | 3275 | * FUNCTION: extend bmap from blkno for nblocks; |
3276 | * dbExtendFS() updates bmap ready for dbAllocBottomUp(); | 3276 | * dbExtendFS() updates bmap ready for dbAllocBottomUp(); |
3277 | * | 3277 | * |
3278 | * L2 | 3278 | * L2 |
3279 | * | | 3279 | * | |
@@ -3284,7 +3284,7 @@ static int dbAllocDmapBU(struct bmap * bmp, struct dmap * dp, s64 blkno, | |||
3284 | * d0,...,dn d0,...,dn d0,...,dn d0,...,dn d0,...,dn d0,.,dm; | 3284 | * d0,...,dn d0,...,dn d0,...,dn d0,...,dn d0,...,dn d0,.,dm; |
3285 | * L2L1L0d0,...,dnL0d0,...,dnL0d0,...,dnL1L0d0,...,dnL0d0,...,dnL0d0,..dm | 3285 | * L2L1L0d0,...,dnL0d0,...,dnL0d0,...,dnL1L0d0,...,dnL0d0,...,dnL0d0,..dm |
3286 | * | 3286 | * |
3287 | * <---old---><----------------------------extend-----------------------> | 3287 | * <---old---><----------------------------extend-----------------------> |
3288 | */ | 3288 | */ |
3289 | int dbExtendFS(struct inode *ipbmap, s64 blkno, s64 nblocks) | 3289 | int dbExtendFS(struct inode *ipbmap, s64 blkno, s64 nblocks) |
3290 | { | 3290 | { |
@@ -3330,7 +3330,7 @@ int dbExtendFS(struct inode *ipbmap, s64 blkno, s64 nblocks) | |||
3330 | bmp->db_numag += ((u32) newsize % (u32) bmp->db_agsize) ? 1 : 0; | 3330 | bmp->db_numag += ((u32) newsize % (u32) bmp->db_agsize) ? 1 : 0; |
3331 | 3331 | ||
3332 | /* | 3332 | /* |
3333 | * reconfigure db_agfree[] | 3333 | * reconfigure db_agfree[] |
3334 | * from old AG configuration to new AG configuration; | 3334 | * from old AG configuration to new AG configuration; |
3335 | * | 3335 | * |
3336 | * coalesce contiguous k (newAGSize/oldAGSize) AGs; | 3336 | * coalesce contiguous k (newAGSize/oldAGSize) AGs; |
@@ -3491,7 +3491,7 @@ int dbExtendFS(struct inode *ipbmap, s64 blkno, s64 nblocks) | |||
3491 | } /* for each dmap in a L0 */ | 3491 | } /* for each dmap in a L0 */ |
3492 | 3492 | ||
3493 | /* | 3493 | /* |
3494 | * build current L0 page from its leaves, and | 3494 | * build current L0 page from its leaves, and |
3495 | * initialize corresponding parent L1 leaf | 3495 | * initialize corresponding parent L1 leaf |
3496 | */ | 3496 | */ |
3497 | *l1leaf = dbInitDmapCtl(l0dcp, 0, ++i); | 3497 | *l1leaf = dbInitDmapCtl(l0dcp, 0, ++i); |
@@ -3515,7 +3515,7 @@ int dbExtendFS(struct inode *ipbmap, s64 blkno, s64 nblocks) | |||
3515 | } /* for each L0 in a L1 */ | 3515 | } /* for each L0 in a L1 */ |
3516 | 3516 | ||
3517 | /* | 3517 | /* |
3518 | * build current L1 page from its leaves, and | 3518 | * build current L1 page from its leaves, and |
3519 | * initialize corresponding parent L2 leaf | 3519 | * initialize corresponding parent L2 leaf |
3520 | */ | 3520 | */ |
3521 | *l2leaf = dbInitDmapCtl(l1dcp, 1, ++j); | 3521 | *l2leaf = dbInitDmapCtl(l1dcp, 1, ++j); |
@@ -3570,7 +3570,7 @@ void dbFinalizeBmap(struct inode *ipbmap) | |||
3570 | * finalize bmap control page | 3570 | * finalize bmap control page |
3571 | */ | 3571 | */ |
3572 | //finalize: | 3572 | //finalize: |
3573 | /* | 3573 | /* |
3574 | * compute db_agpref: preferred ag to allocate from | 3574 | * compute db_agpref: preferred ag to allocate from |
3575 | * (the leftmost ag with average free space in it); | 3575 | * (the leftmost ag with average free space in it); |
3576 | */ | 3576 | */ |
@@ -3614,9 +3614,9 @@ void dbFinalizeBmap(struct inode *ipbmap) | |||
3614 | 3614 | ||
3615 | /* | 3615 | /* |
3616 | * compute db_aglevel, db_agheigth, db_width, db_agstart: | 3616 | * compute db_aglevel, db_agheigth, db_width, db_agstart: |
3617 | * an ag is covered in aglevel dmapctl summary tree, | 3617 | * an ag is covered in aglevel dmapctl summary tree, |
3618 | * at agheight level height (from leaf) with agwidth number of nodes | 3618 | * at agheight level height (from leaf) with agwidth number of nodes |
3619 | * each, which starts at agstart index node of the smmary tree node | 3619 | * each, which starts at agstart index node of the smmary tree node |
3620 | * array; | 3620 | * array; |
3621 | */ | 3621 | */ |
3622 | bmp->db_aglevel = BMAPSZTOLEV(bmp->db_agsize); | 3622 | bmp->db_aglevel = BMAPSZTOLEV(bmp->db_agsize); |
@@ -3635,13 +3635,13 @@ void dbFinalizeBmap(struct inode *ipbmap) | |||
3635 | 3635 | ||
3636 | /* | 3636 | /* |
3637 | * NAME: dbInitDmap()/ujfs_idmap_page() | 3637 | * NAME: dbInitDmap()/ujfs_idmap_page() |
3638 | * | 3638 | * |
3639 | * FUNCTION: initialize working/persistent bitmap of the dmap page | 3639 | * FUNCTION: initialize working/persistent bitmap of the dmap page |
3640 | * for the specified number of blocks: | 3640 | * for the specified number of blocks: |
3641 | * | 3641 | * |
3642 | * at entry, the bitmaps had been initialized as free (ZEROS); | 3642 | * at entry, the bitmaps had been initialized as free (ZEROS); |
3643 | * The number of blocks will only account for the actually | 3643 | * The number of blocks will only account for the actually |
3644 | * existing blocks. Blocks which don't actually exist in | 3644 | * existing blocks. Blocks which don't actually exist in |
3645 | * the aggregate will be marked as allocated (ONES); | 3645 | * the aggregate will be marked as allocated (ONES); |
3646 | * | 3646 | * |
3647 | * PARAMETERS: | 3647 | * PARAMETERS: |
@@ -3677,7 +3677,7 @@ static int dbInitDmap(struct dmap * dp, s64 Blkno, int nblocks) | |||
3677 | 3677 | ||
3678 | /* | 3678 | /* |
3679 | * free the bits corresponding to the block range (ZEROS): | 3679 | * free the bits corresponding to the block range (ZEROS): |
3680 | * note: not all bits of the first and last words may be contained | 3680 | * note: not all bits of the first and last words may be contained |
3681 | * within the block range. | 3681 | * within the block range. |
3682 | */ | 3682 | */ |
3683 | for (r = nblocks; r > 0; r -= nb, blkno += nb) { | 3683 | for (r = nblocks; r > 0; r -= nb, blkno += nb) { |
@@ -3709,7 +3709,7 @@ static int dbInitDmap(struct dmap * dp, s64 Blkno, int nblocks) | |||
3709 | } | 3709 | } |
3710 | 3710 | ||
3711 | /* | 3711 | /* |
3712 | * mark bits following the range to be freed (non-existing | 3712 | * mark bits following the range to be freed (non-existing |
3713 | * blocks) as allocated (ONES) | 3713 | * blocks) as allocated (ONES) |
3714 | */ | 3714 | */ |
3715 | 3715 | ||
@@ -3741,11 +3741,11 @@ static int dbInitDmap(struct dmap * dp, s64 Blkno, int nblocks) | |||
3741 | 3741 | ||
3742 | /* | 3742 | /* |
3743 | * NAME: dbInitDmapTree()/ujfs_complete_dmap() | 3743 | * NAME: dbInitDmapTree()/ujfs_complete_dmap() |
3744 | * | 3744 | * |
3745 | * FUNCTION: initialize summary tree of the specified dmap: | 3745 | * FUNCTION: initialize summary tree of the specified dmap: |
3746 | * | 3746 | * |
3747 | * at entry, bitmap of the dmap has been initialized; | 3747 | * at entry, bitmap of the dmap has been initialized; |
3748 | * | 3748 | * |
3749 | * PARAMETERS: | 3749 | * PARAMETERS: |
3750 | * dp - dmap to complete | 3750 | * dp - dmap to complete |
3751 | * blkno - starting block number for this dmap | 3751 | * blkno - starting block number for this dmap |
@@ -3769,7 +3769,7 @@ static int dbInitDmapTree(struct dmap * dp) | |||
3769 | 3769 | ||
3770 | /* init each leaf from corresponding wmap word: | 3770 | /* init each leaf from corresponding wmap word: |
3771 | * note: leaf is set to NOFREE(-1) if all blocks of corresponding | 3771 | * note: leaf is set to NOFREE(-1) if all blocks of corresponding |
3772 | * bitmap word are allocated. | 3772 | * bitmap word are allocated. |
3773 | */ | 3773 | */ |
3774 | cp = tp->stree + le32_to_cpu(tp->leafidx); | 3774 | cp = tp->stree + le32_to_cpu(tp->leafidx); |
3775 | for (i = 0; i < LPERDMAP; i++) | 3775 | for (i = 0; i < LPERDMAP; i++) |
@@ -3782,10 +3782,10 @@ static int dbInitDmapTree(struct dmap * dp) | |||
3782 | 3782 | ||
3783 | /* | 3783 | /* |
3784 | * NAME: dbInitTree()/ujfs_adjtree() | 3784 | * NAME: dbInitTree()/ujfs_adjtree() |
3785 | * | 3785 | * |
3786 | * FUNCTION: initialize binary buddy summary tree of a dmap or dmapctl. | 3786 | * FUNCTION: initialize binary buddy summary tree of a dmap or dmapctl. |
3787 | * | 3787 | * |
3788 | * at entry, the leaves of the tree has been initialized | 3788 | * at entry, the leaves of the tree has been initialized |
3789 | * from corresponding bitmap word or root of summary tree | 3789 | * from corresponding bitmap word or root of summary tree |
3790 | * of the child control page; | 3790 | * of the child control page; |
3791 | * configure binary buddy system at the leaf level, then | 3791 | * configure binary buddy system at the leaf level, then |
@@ -3813,15 +3813,15 @@ static int dbInitTree(struct dmaptree * dtp) | |||
3813 | /* | 3813 | /* |
3814 | * configure the leaf levevl into binary buddy system | 3814 | * configure the leaf levevl into binary buddy system |
3815 | * | 3815 | * |
3816 | * Try to combine buddies starting with a buddy size of 1 | 3816 | * Try to combine buddies starting with a buddy size of 1 |
3817 | * (i.e. two leaves). At a buddy size of 1 two buddy leaves | 3817 | * (i.e. two leaves). At a buddy size of 1 two buddy leaves |
3818 | * can be combined if both buddies have a maximum free of l2min; | 3818 | * can be combined if both buddies have a maximum free of l2min; |
3819 | * the combination will result in the left-most buddy leaf having | 3819 | * the combination will result in the left-most buddy leaf having |
3820 | * a maximum free of l2min+1. | 3820 | * a maximum free of l2min+1. |
3821 | * After processing all buddies for a given size, process buddies | 3821 | * After processing all buddies for a given size, process buddies |
3822 | * at the next higher buddy size (i.e. current size * 2) and | 3822 | * at the next higher buddy size (i.e. current size * 2) and |
3823 | * the next maximum free (current free + 1). | 3823 | * the next maximum free (current free + 1). |
3824 | * This continues until the maximum possible buddy combination | 3824 | * This continues until the maximum possible buddy combination |
3825 | * yields maximum free. | 3825 | * yields maximum free. |
3826 | */ | 3826 | */ |
3827 | for (l2free = dtp->budmin, bsize = 1; l2free < l2max; | 3827 | for (l2free = dtp->budmin, bsize = 1; l2free < l2max; |
@@ -3845,10 +3845,10 @@ static int dbInitTree(struct dmaptree * dtp) | |||
3845 | * bubble summary information of leaves up the tree. | 3845 | * bubble summary information of leaves up the tree. |
3846 | * | 3846 | * |
3847 | * Starting at the leaf node level, the four nodes described by | 3847 | * Starting at the leaf node level, the four nodes described by |
3848 | * the higher level parent node are compared for a maximum free and | 3848 | * the higher level parent node are compared for a maximum free and |
3849 | * this maximum becomes the value of the parent node. | 3849 | * this maximum becomes the value of the parent node. |
3850 | * when all lower level nodes are processed in this fashion then | 3850 | * when all lower level nodes are processed in this fashion then |
3851 | * move up to the next level (parent becomes a lower level node) and | 3851 | * move up to the next level (parent becomes a lower level node) and |
3852 | * continue the process for that level. | 3852 | * continue the process for that level. |
3853 | */ | 3853 | */ |
3854 | for (child = le32_to_cpu(dtp->leafidx), | 3854 | for (child = le32_to_cpu(dtp->leafidx), |
@@ -3857,7 +3857,7 @@ static int dbInitTree(struct dmaptree * dtp) | |||
3857 | /* get index of 1st node of parent level */ | 3857 | /* get index of 1st node of parent level */ |
3858 | parent = (child - 1) >> 2; | 3858 | parent = (child - 1) >> 2; |
3859 | 3859 | ||
3860 | /* set the value of the parent node as the maximum | 3860 | /* set the value of the parent node as the maximum |
3861 | * of the four nodes of the current level. | 3861 | * of the four nodes of the current level. |
3862 | */ | 3862 | */ |
3863 | for (i = 0, cp = tp + child, cp1 = tp + parent; | 3863 | for (i = 0, cp = tp + child, cp1 = tp + parent; |
@@ -3885,8 +3885,8 @@ static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i) | |||
3885 | dcp->budmin = L2BPERDMAP + L2LPERCTL * level; | 3885 | dcp->budmin = L2BPERDMAP + L2LPERCTL * level; |
3886 | 3886 | ||
3887 | /* | 3887 | /* |
3888 | * initialize the leaves of current level that were not covered | 3888 | * initialize the leaves of current level that were not covered |
3889 | * by the specified input block range (i.e. the leaves have no | 3889 | * by the specified input block range (i.e. the leaves have no |
3890 | * low level dmapctl or dmap). | 3890 | * low level dmapctl or dmap). |
3891 | */ | 3891 | */ |
3892 | cp = &dcp->stree[CTLLEAFIND + i]; | 3892 | cp = &dcp->stree[CTLLEAFIND + i]; |
@@ -3900,9 +3900,9 @@ static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i) | |||
3900 | 3900 | ||
3901 | /* | 3901 | /* |
3902 | * NAME: dbGetL2AGSize()/ujfs_getagl2size() | 3902 | * NAME: dbGetL2AGSize()/ujfs_getagl2size() |
3903 | * | 3903 | * |
3904 | * FUNCTION: Determine log2(allocation group size) from aggregate size | 3904 | * FUNCTION: Determine log2(allocation group size) from aggregate size |
3905 | * | 3905 | * |
3906 | * PARAMETERS: | 3906 | * PARAMETERS: |
3907 | * nblocks - Number of blocks in aggregate | 3907 | * nblocks - Number of blocks in aggregate |
3908 | * | 3908 | * |
@@ -3935,8 +3935,8 @@ static int dbGetL2AGSize(s64 nblocks) | |||
3935 | 3935 | ||
3936 | /* | 3936 | /* |
3937 | * NAME: dbMapFileSizeToMapSize() | 3937 | * NAME: dbMapFileSizeToMapSize() |
3938 | * | 3938 | * |
3939 | * FUNCTION: compute number of blocks the block allocation map file | 3939 | * FUNCTION: compute number of blocks the block allocation map file |
3940 | * can cover from the map file size; | 3940 | * can cover from the map file size; |
3941 | * | 3941 | * |
3942 | * RETURNS: Number of blocks which can be covered by this block map file; | 3942 | * RETURNS: Number of blocks which can be covered by this block map file; |
@@ -3968,7 +3968,7 @@ s64 dbMapFileSizeToMapSize(struct inode * ipbmap) | |||
3968 | npages = nblocks >> JFS_SBI(sb)->l2nbperpage; | 3968 | npages = nblocks >> JFS_SBI(sb)->l2nbperpage; |
3969 | level = BMAPPGTOLEV(npages); | 3969 | level = BMAPPGTOLEV(npages); |
3970 | 3970 | ||
3971 | /* At each level, accumulate the number of dmap pages covered by | 3971 | /* At each level, accumulate the number of dmap pages covered by |
3972 | * the number of full child levels below it; | 3972 | * the number of full child levels below it; |
3973 | * repeat for the last incomplete child level. | 3973 | * repeat for the last incomplete child level. |
3974 | */ | 3974 | */ |
@@ -3990,7 +3990,7 @@ s64 dbMapFileSizeToMapSize(struct inode * ipbmap) | |||
3990 | npages--; | 3990 | npages--; |
3991 | } | 3991 | } |
3992 | 3992 | ||
3993 | /* convert the number of dmaps into the number of blocks | 3993 | /* convert the number of dmaps into the number of blocks |
3994 | * which can be covered by the dmaps; | 3994 | * which can be covered by the dmaps; |
3995 | */ | 3995 | */ |
3996 | nblocks = ndmaps << L2BPERDMAP; | 3996 | nblocks = ndmaps << L2BPERDMAP; |
diff --git a/fs/jfs/jfs_dmap.h b/fs/jfs/jfs_dmap.h index 8b14cc8e0228..45ea454c74bd 100644 --- a/fs/jfs/jfs_dmap.h +++ b/fs/jfs/jfs_dmap.h | |||
@@ -1,18 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2000-2002 | 2 | * Copyright (C) International Business Machines Corp., 2000-2002 |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_DMAP | 18 | #ifndef _H_JFS_DMAP |
@@ -27,7 +27,7 @@ | |||
27 | #define L2LPERDMAP 8 /* l2 number of leaves per dmap tree */ | 27 | #define L2LPERDMAP 8 /* l2 number of leaves per dmap tree */ |
28 | #define DBWORD 32 /* # of blks covered by a map word */ | 28 | #define DBWORD 32 /* # of blks covered by a map word */ |
29 | #define L2DBWORD 5 /* l2 # of blks covered by a mword */ | 29 | #define L2DBWORD 5 /* l2 # of blks covered by a mword */ |
30 | #define BUDMIN L2DBWORD /* max free string in a map word */ | 30 | #define BUDMIN L2DBWORD /* max free string in a map word */ |
31 | #define BPERDMAP (LPERDMAP * DBWORD) /* num of blks per dmap */ | 31 | #define BPERDMAP (LPERDMAP * DBWORD) /* num of blks per dmap */ |
32 | #define L2BPERDMAP 13 /* l2 num of blks per dmap */ | 32 | #define L2BPERDMAP 13 /* l2 num of blks per dmap */ |
33 | #define CTLTREESIZE (1024+256+64+16+4+1) /* size of a dmapctl tree */ | 33 | #define CTLTREESIZE (1024+256+64+16+4+1) /* size of a dmapctl tree */ |
@@ -57,7 +57,7 @@ | |||
57 | 57 | ||
58 | #define MAXMAPSIZE MAXL2SIZE /* maximum aggregate map size */ | 58 | #define MAXMAPSIZE MAXL2SIZE /* maximum aggregate map size */ |
59 | 59 | ||
60 | /* | 60 | /* |
61 | * determine the maximum free string for four (lower level) nodes | 61 | * determine the maximum free string for four (lower level) nodes |
62 | * of the tree. | 62 | * of the tree. |
63 | */ | 63 | */ |
@@ -122,7 +122,7 @@ static __inline signed char TREEMAX(signed char *cp) | |||
122 | #define BLKTOCTL(b,s,l) \ | 122 | #define BLKTOCTL(b,s,l) \ |
123 | (((l) == 2) ? 1 : ((l) == 1) ? BLKTOL1((b),(s)) : BLKTOL0((b),(s))) | 123 | (((l) == 2) ? 1 : ((l) == 1) ? BLKTOL1((b),(s)) : BLKTOL0((b),(s))) |
124 | 124 | ||
125 | /* | 125 | /* |
126 | * convert aggregate map size to the zero origin dmapctl level of the | 126 | * convert aggregate map size to the zero origin dmapctl level of the |
127 | * top dmapctl. | 127 | * top dmapctl. |
128 | */ | 128 | */ |
@@ -192,13 +192,13 @@ typedef union dmtree { | |||
192 | 192 | ||
193 | /* macros for accessing fields within dmtree */ | 193 | /* macros for accessing fields within dmtree */ |
194 | #define dmt_nleafs t1.nleafs | 194 | #define dmt_nleafs t1.nleafs |
195 | #define dmt_l2nleafs t1.l2nleafs | 195 | #define dmt_l2nleafs t1.l2nleafs |
196 | #define dmt_leafidx t1.leafidx | 196 | #define dmt_leafidx t1.leafidx |
197 | #define dmt_height t1.height | 197 | #define dmt_height t1.height |
198 | #define dmt_budmin t1.budmin | 198 | #define dmt_budmin t1.budmin |
199 | #define dmt_stree t1.stree | 199 | #define dmt_stree t1.stree |
200 | 200 | ||
201 | /* | 201 | /* |
202 | * on-disk aggregate disk allocation map descriptor. | 202 | * on-disk aggregate disk allocation map descriptor. |
203 | */ | 203 | */ |
204 | struct dbmap_disk { | 204 | struct dbmap_disk { |
@@ -237,7 +237,7 @@ struct dbmap { | |||
237 | s64 dn_agsize; /* num of blks per alloc group */ | 237 | s64 dn_agsize; /* num of blks per alloc group */ |
238 | signed char dn_maxfreebud; /* max free buddy system */ | 238 | signed char dn_maxfreebud; /* max free buddy system */ |
239 | }; /* - 4096 - */ | 239 | }; /* - 4096 - */ |
240 | /* | 240 | /* |
241 | * in-memory aggregate disk allocation map descriptor. | 241 | * in-memory aggregate disk allocation map descriptor. |
242 | */ | 242 | */ |
243 | struct bmap { | 243 | struct bmap { |
diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c index a9f2604f28cf..ecb2216d881c 100644 --- a/fs/jfs/jfs_dtree.c +++ b/fs/jfs/jfs_dtree.c | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
@@ -78,7 +78,7 @@ | |||
78 | * | 78 | * |
79 | * case-insensitive search: | 79 | * case-insensitive search: |
80 | * | 80 | * |
81 | * fold search key; | 81 | * fold search key; |
82 | * | 82 | * |
83 | * case-insensitive search of B-tree: | 83 | * case-insensitive search of B-tree: |
84 | * for internal entry, router key is already folded; | 84 | * for internal entry, router key is already folded; |
@@ -93,7 +93,7 @@ | |||
93 | * else | 93 | * else |
94 | * return no match; | 94 | * return no match; |
95 | * | 95 | * |
96 | * serialization: | 96 | * serialization: |
97 | * target directory inode lock is being held on entry/exit | 97 | * target directory inode lock is being held on entry/exit |
98 | * of all main directory service routines. | 98 | * of all main directory service routines. |
99 | * | 99 | * |
@@ -925,7 +925,7 @@ int dtInsert(tid_t tid, struct inode *ip, | |||
925 | * | 925 | * |
926 | * return: 0 - success; | 926 | * return: 0 - success; |
927 | * errno - failure; | 927 | * errno - failure; |
928 | * leaf page unpinned; | 928 | * leaf page unpinned; |
929 | */ | 929 | */ |
930 | static int dtSplitUp(tid_t tid, | 930 | static int dtSplitUp(tid_t tid, |
931 | struct inode *ip, struct dtsplit * split, struct btstack * btstack) | 931 | struct inode *ip, struct dtsplit * split, struct btstack * btstack) |
@@ -3767,7 +3767,7 @@ static int ciCompare(struct component_name * key, /* search key */ | |||
3767 | * across page boundary | 3767 | * across page boundary |
3768 | * | 3768 | * |
3769 | * return: non-zero on error | 3769 | * return: non-zero on error |
3770 | * | 3770 | * |
3771 | */ | 3771 | */ |
3772 | static int ciGetLeafPrefixKey(dtpage_t * lp, int li, dtpage_t * rp, | 3772 | static int ciGetLeafPrefixKey(dtpage_t * lp, int li, dtpage_t * rp, |
3773 | int ri, struct component_name * key, int flag) | 3773 | int ri, struct component_name * key, int flag) |
diff --git a/fs/jfs/jfs_dtree.h b/fs/jfs/jfs_dtree.h index 13e4fdf07724..af8513f78648 100644 --- a/fs/jfs/jfs_dtree.h +++ b/fs/jfs/jfs_dtree.h | |||
@@ -1,18 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2000-2002 | 2 | * Copyright (C) International Business Machines Corp., 2000-2002 |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_DTREE | 18 | #ifndef _H_JFS_DTREE |
@@ -80,7 +80,7 @@ struct idtentry { | |||
80 | /* | 80 | /* |
81 | * leaf node entry head/only segment | 81 | * leaf node entry head/only segment |
82 | * | 82 | * |
83 | * For legacy filesystems, name contains 13 wchars -- no index field | 83 | * For legacy filesystems, name contains 13 wchars -- no index field |
84 | */ | 84 | */ |
85 | struct ldtentry { | 85 | struct ldtentry { |
86 | __le32 inumber; /* 4: 4-byte aligned */ | 86 | __le32 inumber; /* 4: 4-byte aligned */ |
diff --git a/fs/jfs/jfs_extent.c b/fs/jfs/jfs_extent.c index 933b7457bfbd..a35bdca6a805 100644 --- a/fs/jfs/jfs_extent.c +++ b/fs/jfs/jfs_extent.c | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
@@ -125,7 +125,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr) | |||
125 | } | 125 | } |
126 | 126 | ||
127 | /* allocate the disk blocks for the extent. initially, extBalloc() | 127 | /* allocate the disk blocks for the extent. initially, extBalloc() |
128 | * will try to allocate disk blocks for the requested size (xlen). | 128 | * will try to allocate disk blocks for the requested size (xlen). |
129 | * if this fails (xlen contiguous free blocks not avaliable), it'll | 129 | * if this fails (xlen contiguous free blocks not avaliable), it'll |
130 | * try to allocate a smaller number of blocks (producing a smaller | 130 | * try to allocate a smaller number of blocks (producing a smaller |
131 | * extent), with this smaller number of blocks consisting of the | 131 | * extent), with this smaller number of blocks consisting of the |
@@ -150,7 +150,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr) | |||
150 | /* determine the value of the extent flag */ | 150 | /* determine the value of the extent flag */ |
151 | xflag = abnr ? XAD_NOTRECORDED : 0; | 151 | xflag = abnr ? XAD_NOTRECORDED : 0; |
152 | 152 | ||
153 | /* if we can extend the hint extent to cover the current request, | 153 | /* if we can extend the hint extent to cover the current request, |
154 | * extend it. otherwise, insert a new extent to | 154 | * extend it. otherwise, insert a new extent to |
155 | * cover the current request. | 155 | * cover the current request. |
156 | */ | 156 | */ |
@@ -159,7 +159,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr) | |||
159 | else | 159 | else |
160 | rc = xtInsert(0, ip, xflag, xoff, (int) nxlen, &nxaddr, 0); | 160 | rc = xtInsert(0, ip, xflag, xoff, (int) nxlen, &nxaddr, 0); |
161 | 161 | ||
162 | /* if the extend or insert failed, | 162 | /* if the extend or insert failed, |
163 | * free the newly allocated blocks and return the error. | 163 | * free the newly allocated blocks and return the error. |
164 | */ | 164 | */ |
165 | if (rc) { | 165 | if (rc) { |
@@ -235,7 +235,7 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, bool abnr) | |||
235 | xoff = offsetXAD(xp); | 235 | xoff = offsetXAD(xp); |
236 | 236 | ||
237 | /* if the extend page is abnr and if the request is for | 237 | /* if the extend page is abnr and if the request is for |
238 | * the extent to be allocated and recorded, | 238 | * the extent to be allocated and recorded, |
239 | * make the page allocated and recorded. | 239 | * make the page allocated and recorded. |
240 | */ | 240 | */ |
241 | if ((xp->flag & XAD_NOTRECORDED) && !abnr) { | 241 | if ((xp->flag & XAD_NOTRECORDED) && !abnr) { |
@@ -397,7 +397,7 @@ int extHint(struct inode *ip, s64 offset, xad_t * xp) | |||
397 | if ((rc = xtLookupList(ip, &lxdl, &xadl, 0))) | 397 | if ((rc = xtLookupList(ip, &lxdl, &xadl, 0))) |
398 | return (rc); | 398 | return (rc); |
399 | 399 | ||
400 | /* check if not extent exists for the previous page. | 400 | /* check if not extent exists for the previous page. |
401 | * this is possible for sparse files. | 401 | * this is possible for sparse files. |
402 | */ | 402 | */ |
403 | if (xadl.nxad == 0) { | 403 | if (xadl.nxad == 0) { |
@@ -410,7 +410,7 @@ int extHint(struct inode *ip, s64 offset, xad_t * xp) | |||
410 | */ | 410 | */ |
411 | xp->flag &= XAD_NOTRECORDED; | 411 | xp->flag &= XAD_NOTRECORDED; |
412 | 412 | ||
413 | if(xadl.nxad != 1 || lengthXAD(xp) != nbperpage) { | 413 | if(xadl.nxad != 1 || lengthXAD(xp) != nbperpage) { |
414 | jfs_error(ip->i_sb, "extHint: corrupt xtree"); | 414 | jfs_error(ip->i_sb, "extHint: corrupt xtree"); |
415 | return -EIO; | 415 | return -EIO; |
416 | } | 416 | } |
@@ -492,7 +492,7 @@ int extFill(struct inode *ip, xad_t * xp) | |||
492 | * FUNCTION: allocate disk blocks to form an extent. | 492 | * FUNCTION: allocate disk blocks to form an extent. |
493 | * | 493 | * |
494 | * initially, we will try to allocate disk blocks for the | 494 | * initially, we will try to allocate disk blocks for the |
495 | * requested size (nblocks). if this fails (nblocks | 495 | * requested size (nblocks). if this fails (nblocks |
496 | * contiguous free blocks not avaliable), we'll try to allocate | 496 | * contiguous free blocks not avaliable), we'll try to allocate |
497 | * a smaller number of blocks (producing a smaller extent), with | 497 | * a smaller number of blocks (producing a smaller extent), with |
498 | * this smaller number of blocks consisting of the requested | 498 | * this smaller number of blocks consisting of the requested |
@@ -500,7 +500,7 @@ int extFill(struct inode *ip, xad_t * xp) | |||
500 | * number (i.e. 16 -> 8). we'll continue to round down and | 500 | * number (i.e. 16 -> 8). we'll continue to round down and |
501 | * retry the allocation until the number of blocks to allocate | 501 | * retry the allocation until the number of blocks to allocate |
502 | * is smaller than the number of blocks per page. | 502 | * is smaller than the number of blocks per page. |
503 | * | 503 | * |
504 | * PARAMETERS: | 504 | * PARAMETERS: |
505 | * ip - the inode of the file. | 505 | * ip - the inode of the file. |
506 | * hint - disk block number to be used as an allocation hint. | 506 | * hint - disk block number to be used as an allocation hint. |
@@ -509,7 +509,7 @@ int extFill(struct inode *ip, xad_t * xp) | |||
509 | * exit, this value is set to the number of blocks actually | 509 | * exit, this value is set to the number of blocks actually |
510 | * allocated. | 510 | * allocated. |
511 | * blkno - pointer to a block address that is filled in on successful | 511 | * blkno - pointer to a block address that is filled in on successful |
512 | * return with the starting block number of the newly | 512 | * return with the starting block number of the newly |
513 | * allocated block range. | 513 | * allocated block range. |
514 | * | 514 | * |
515 | * RETURN VALUES: | 515 | * RETURN VALUES: |
@@ -530,7 +530,7 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno) | |||
530 | /* get the number of blocks to initially attempt to allocate. | 530 | /* get the number of blocks to initially attempt to allocate. |
531 | * we'll first try the number of blocks requested unless this | 531 | * we'll first try the number of blocks requested unless this |
532 | * number is greater than the maximum number of contiguous free | 532 | * number is greater than the maximum number of contiguous free |
533 | * blocks in the map. in that case, we'll start off with the | 533 | * blocks in the map. in that case, we'll start off with the |
534 | * maximum free. | 534 | * maximum free. |
535 | */ | 535 | */ |
536 | max = (s64) 1 << bmp->db_maxfreebud; | 536 | max = (s64) 1 << bmp->db_maxfreebud; |
@@ -582,19 +582,19 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno) | |||
582 | * | 582 | * |
583 | * FUNCTION: attempt to extend an extent's allocation. | 583 | * FUNCTION: attempt to extend an extent's allocation. |
584 | * | 584 | * |
585 | * initially, we will try to extend the extent's allocation | 585 | * Initially, we will try to extend the extent's allocation |
586 | * in place. if this fails, we'll try to move the extent | 586 | * in place. If this fails, we'll try to move the extent |
587 | * to a new set of blocks. if moving the extent, we initially | 587 | * to a new set of blocks. If moving the extent, we initially |
588 | * will try to allocate disk blocks for the requested size | 588 | * will try to allocate disk blocks for the requested size |
589 | * (nnew). if this fails (new contiguous free blocks not | 589 | * (newnblks). if this fails (new contiguous free blocks not |
590 | * avaliable), we'll try to allocate a smaller number of | 590 | * avaliable), we'll try to allocate a smaller number of |
591 | * blocks (producing a smaller extent), with this smaller | 591 | * blocks (producing a smaller extent), with this smaller |
592 | * number of blocks consisting of the requested number of | 592 | * number of blocks consisting of the requested number of |
593 | * blocks rounded down to the next smaller power of 2 | 593 | * blocks rounded down to the next smaller power of 2 |
594 | * number (i.e. 16 -> 8). we'll continue to round down and | 594 | * number (i.e. 16 -> 8). We'll continue to round down and |
595 | * retry the allocation until the number of blocks to allocate | 595 | * retry the allocation until the number of blocks to allocate |
596 | * is smaller than the number of blocks per page. | 596 | * is smaller than the number of blocks per page. |
597 | * | 597 | * |
598 | * PARAMETERS: | 598 | * PARAMETERS: |
599 | * ip - the inode of the file. | 599 | * ip - the inode of the file. |
600 | * blkno - starting block number of the extents current allocation. | 600 | * blkno - starting block number of the extents current allocation. |
@@ -625,7 +625,7 @@ extBrealloc(struct inode *ip, | |||
625 | return (rc); | 625 | return (rc); |
626 | } | 626 | } |
627 | 627 | ||
628 | /* in place extension not possible. | 628 | /* in place extension not possible. |
629 | * try to move the extent to a new set of blocks. | 629 | * try to move the extent to a new set of blocks. |
630 | */ | 630 | */ |
631 | return (extBalloc(ip, blkno, newnblks, newblkno)); | 631 | return (extBalloc(ip, blkno, newnblks, newblkno)); |
diff --git a/fs/jfs/jfs_extent.h b/fs/jfs/jfs_extent.h index 3a7f3f22e989..b567e12c52d3 100644 --- a/fs/jfs/jfs_extent.h +++ b/fs/jfs/jfs_extent.h | |||
@@ -1,18 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2000-2001 | 2 | * Copyright (C) International Business Machines Corp., 2000-2001 |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_EXTENT | 18 | #ifndef _H_JFS_EXTENT |
diff --git a/fs/jfs/jfs_filsys.h b/fs/jfs/jfs_filsys.h index 72a5588faeca..9901928668cf 100644 --- a/fs/jfs/jfs_filsys.h +++ b/fs/jfs/jfs_filsys.h | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_FILSYS | 18 | #ifndef _H_JFS_FILSYS |
@@ -21,9 +21,9 @@ | |||
21 | /* | 21 | /* |
22 | * jfs_filsys.h | 22 | * jfs_filsys.h |
23 | * | 23 | * |
24 | * file system (implementation-dependent) constants | 24 | * file system (implementation-dependent) constants |
25 | * | 25 | * |
26 | * refer to <limits.h> for system wide implementation-dependent constants | 26 | * refer to <limits.h> for system wide implementation-dependent constants |
27 | */ | 27 | */ |
28 | 28 | ||
29 | /* | 29 | /* |
@@ -49,7 +49,7 @@ | |||
49 | 49 | ||
50 | #define JFS_DFS 0x20000000 /* DCE DFS LFS support */ | 50 | #define JFS_DFS 0x20000000 /* DCE DFS LFS support */ |
51 | 51 | ||
52 | #define JFS_LINUX 0x10000000 /* Linux support */ | 52 | #define JFS_LINUX 0x10000000 /* Linux support */ |
53 | /* case-sensitive name/directory support */ | 53 | /* case-sensitive name/directory support */ |
54 | 54 | ||
55 | /* directory option */ | 55 | /* directory option */ |
@@ -59,7 +59,7 @@ | |||
59 | #define JFS_COMMIT 0x00000f00 /* commit option mask */ | 59 | #define JFS_COMMIT 0x00000f00 /* commit option mask */ |
60 | #define JFS_GROUPCOMMIT 0x00000100 /* group (of 1) commit */ | 60 | #define JFS_GROUPCOMMIT 0x00000100 /* group (of 1) commit */ |
61 | #define JFS_LAZYCOMMIT 0x00000200 /* lazy commit */ | 61 | #define JFS_LAZYCOMMIT 0x00000200 /* lazy commit */ |
62 | #define JFS_TMPFS 0x00000400 /* temporary file system - | 62 | #define JFS_TMPFS 0x00000400 /* temporary file system - |
63 | * do not log/commit: | 63 | * do not log/commit: |
64 | */ | 64 | */ |
65 | 65 | ||
@@ -196,7 +196,7 @@ | |||
196 | * followed by 1st extent of map | 196 | * followed by 1st extent of map |
197 | */ | 197 | */ |
198 | #define AITBL_OFF (AIMAP_OFF + (SIZE_OF_MAP_PAGE << 1)) | 198 | #define AITBL_OFF (AIMAP_OFF + (SIZE_OF_MAP_PAGE << 1)) |
199 | /* | 199 | /* |
200 | * 1st extent of aggregate inode table | 200 | * 1st extent of aggregate inode table |
201 | */ | 201 | */ |
202 | #define SUPER2_OFF (AITBL_OFF + INODE_EXTENT_SIZE) | 202 | #define SUPER2_OFF (AITBL_OFF + INODE_EXTENT_SIZE) |
@@ -270,13 +270,13 @@ | |||
270 | */ | 270 | */ |
271 | #define FM_CLEAN 0x00000000 /* file system is unmounted and clean */ | 271 | #define FM_CLEAN 0x00000000 /* file system is unmounted and clean */ |
272 | #define FM_MOUNT 0x00000001 /* file system is mounted cleanly */ | 272 | #define FM_MOUNT 0x00000001 /* file system is mounted cleanly */ |
273 | #define FM_DIRTY 0x00000002 /* file system was not unmounted and clean | 273 | #define FM_DIRTY 0x00000002 /* file system was not unmounted and clean |
274 | * when mounted or | 274 | * when mounted or |
275 | * commit failure occurred while being mounted: | 275 | * commit failure occurred while being mounted: |
276 | * fsck() must be run to repair | 276 | * fsck() must be run to repair |
277 | */ | 277 | */ |
278 | #define FM_LOGREDO 0x00000004 /* log based recovery (logredo()) failed: | 278 | #define FM_LOGREDO 0x00000004 /* log based recovery (logredo()) failed: |
279 | * fsck() must be run to repair | 279 | * fsck() must be run to repair |
280 | */ | 280 | */ |
281 | #define FM_EXTENDFS 0x00000008 /* file system extendfs() in progress */ | 281 | #define FM_EXTENDFS 0x00000008 /* file system extendfs() in progress */ |
282 | 282 | ||
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index a45ee2489580..489a3d63002d 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
@@ -98,7 +98,7 @@ static void copy_to_dinode(struct dinode *, struct inode *); | |||
98 | * FUNCTION: initialize the incore inode map control structures for | 98 | * FUNCTION: initialize the incore inode map control structures for |
99 | * a fileset or aggregate init time. | 99 | * a fileset or aggregate init time. |
100 | * | 100 | * |
101 | * the inode map's control structure (dinomap) is | 101 | * the inode map's control structure (dinomap) is |
102 | * brought in from disk and placed in virtual memory. | 102 | * brought in from disk and placed in virtual memory. |
103 | * | 103 | * |
104 | * PARAMETERS: | 104 | * PARAMETERS: |
@@ -107,7 +107,7 @@ static void copy_to_dinode(struct dinode *, struct inode *); | |||
107 | * RETURN VALUES: | 107 | * RETURN VALUES: |
108 | * 0 - success | 108 | * 0 - success |
109 | * -ENOMEM - insufficient free virtual memory. | 109 | * -ENOMEM - insufficient free virtual memory. |
110 | * -EIO - i/o error. | 110 | * -EIO - i/o error. |
111 | */ | 111 | */ |
112 | int diMount(struct inode *ipimap) | 112 | int diMount(struct inode *ipimap) |
113 | { | 113 | { |
@@ -191,7 +191,7 @@ int diMount(struct inode *ipimap) | |||
191 | * RETURN VALUES: | 191 | * RETURN VALUES: |
192 | * 0 - success | 192 | * 0 - success |
193 | * -ENOMEM - insufficient free virtual memory. | 193 | * -ENOMEM - insufficient free virtual memory. |
194 | * -EIO - i/o error. | 194 | * -EIO - i/o error. |
195 | */ | 195 | */ |
196 | int diUnmount(struct inode *ipimap, int mounterror) | 196 | int diUnmount(struct inode *ipimap, int mounterror) |
197 | { | 197 | { |
@@ -281,7 +281,7 @@ int diSync(struct inode *ipimap) | |||
281 | * on entry, the specifed incore inode should itself | 281 | * on entry, the specifed incore inode should itself |
282 | * specify the disk inode number corresponding to the | 282 | * specify the disk inode number corresponding to the |
283 | * incore inode (i.e. i_number should be initialized). | 283 | * incore inode (i.e. i_number should be initialized). |
284 | * | 284 | * |
285 | * this routine handles incore inode initialization for | 285 | * this routine handles incore inode initialization for |
286 | * both "special" and "regular" inodes. special inodes | 286 | * both "special" and "regular" inodes. special inodes |
287 | * are those required early in the mount process and | 287 | * are those required early in the mount process and |
@@ -289,7 +289,7 @@ int diSync(struct inode *ipimap) | |||
289 | * is not yet initialized. these "special" inodes are | 289 | * is not yet initialized. these "special" inodes are |
290 | * identified by a NULL inode map inode pointer and are | 290 | * identified by a NULL inode map inode pointer and are |
291 | * actually initialized by a call to diReadSpecial(). | 291 | * actually initialized by a call to diReadSpecial(). |
292 | * | 292 | * |
293 | * for regular inodes, the iag describing the disk inode | 293 | * for regular inodes, the iag describing the disk inode |
294 | * is read from disk to determine the inode extent address | 294 | * is read from disk to determine the inode extent address |
295 | * for the disk inode. with the inode extent address in | 295 | * for the disk inode. with the inode extent address in |
@@ -302,9 +302,9 @@ int diSync(struct inode *ipimap) | |||
302 | * | 302 | * |
303 | * RETURN VALUES: | 303 | * RETURN VALUES: |
304 | * 0 - success | 304 | * 0 - success |
305 | * -EIO - i/o error. | 305 | * -EIO - i/o error. |
306 | * -ENOMEM - insufficient memory | 306 | * -ENOMEM - insufficient memory |
307 | * | 307 | * |
308 | */ | 308 | */ |
309 | int diRead(struct inode *ip) | 309 | int diRead(struct inode *ip) |
310 | { | 310 | { |
@@ -586,14 +586,14 @@ void diFreeSpecial(struct inode *ip) | |||
586 | * page of the extent that contains the disk inode is | 586 | * page of the extent that contains the disk inode is |
587 | * read and the disk inode portion of the incore inode | 587 | * read and the disk inode portion of the incore inode |
588 | * is copied to the disk inode. | 588 | * is copied to the disk inode. |
589 | * | 589 | * |
590 | * PARAMETERS: | 590 | * PARAMETERS: |
591 | * tid - transacation id | 591 | * tid - transacation id |
592 | * ip - pointer to incore inode to be written to the inode extent. | 592 | * ip - pointer to incore inode to be written to the inode extent. |
593 | * | 593 | * |
594 | * RETURN VALUES: | 594 | * RETURN VALUES: |
595 | * 0 - success | 595 | * 0 - success |
596 | * -EIO - i/o error. | 596 | * -EIO - i/o error. |
597 | */ | 597 | */ |
598 | int diWrite(tid_t tid, struct inode *ip) | 598 | int diWrite(tid_t tid, struct inode *ip) |
599 | { | 599 | { |
@@ -676,11 +676,11 @@ int diWrite(tid_t tid, struct inode *ip) | |||
676 | * copy btree root from in-memory inode to on-disk inode | 676 | * copy btree root from in-memory inode to on-disk inode |
677 | * | 677 | * |
678 | * (tlock is taken from inline B+-tree root in in-memory | 678 | * (tlock is taken from inline B+-tree root in in-memory |
679 | * inode when the B+-tree root is updated, which is pointed | 679 | * inode when the B+-tree root is updated, which is pointed |
680 | * by jfs_ip->blid as well as being on tx tlock list) | 680 | * by jfs_ip->blid as well as being on tx tlock list) |
681 | * | 681 | * |
682 | * further processing of btree root is based on the copy | 682 | * further processing of btree root is based on the copy |
683 | * in in-memory inode, where txLog() will log from, and, | 683 | * in in-memory inode, where txLog() will log from, and, |
684 | * for xtree root, txUpdateMap() will update map and reset | 684 | * for xtree root, txUpdateMap() will update map and reset |
685 | * XAD_NEW bit; | 685 | * XAD_NEW bit; |
686 | */ | 686 | */ |
@@ -824,7 +824,7 @@ int diWrite(tid_t tid, struct inode *ip) | |||
824 | memcpy(&dp->di_DASD, &ip->i_DASD, sizeof(struct dasd)); | 824 | memcpy(&dp->di_DASD, &ip->i_DASD, sizeof(struct dasd)); |
825 | #endif /* _JFS_FASTDASD */ | 825 | #endif /* _JFS_FASTDASD */ |
826 | 826 | ||
827 | /* release the buffer holding the updated on-disk inode. | 827 | /* release the buffer holding the updated on-disk inode. |
828 | * the buffer will be later written by commit processing. | 828 | * the buffer will be later written by commit processing. |
829 | */ | 829 | */ |
830 | write_metapage(mp); | 830 | write_metapage(mp); |
@@ -842,7 +842,7 @@ int diWrite(tid_t tid, struct inode *ip) | |||
842 | * if the inode to be freed represents the first (only) | 842 | * if the inode to be freed represents the first (only) |
843 | * free inode within the iag, the iag will be placed on | 843 | * free inode within the iag, the iag will be placed on |
844 | * the ag free inode list. | 844 | * the ag free inode list. |
845 | * | 845 | * |
846 | * freeing the inode will cause the inode extent to be | 846 | * freeing the inode will cause the inode extent to be |
847 | * freed if the inode is the only allocated inode within | 847 | * freed if the inode is the only allocated inode within |
848 | * the extent. in this case all the disk resource backing | 848 | * the extent. in this case all the disk resource backing |
@@ -865,11 +865,11 @@ int diWrite(tid_t tid, struct inode *ip) | |||
865 | * any updates and are held until all updates are complete. | 865 | * any updates and are held until all updates are complete. |
866 | * | 866 | * |
867 | * PARAMETERS: | 867 | * PARAMETERS: |
868 | * ip - inode to be freed. | 868 | * ip - inode to be freed. |
869 | * | 869 | * |
870 | * RETURN VALUES: | 870 | * RETURN VALUES: |
871 | * 0 - success | 871 | * 0 - success |
872 | * -EIO - i/o error. | 872 | * -EIO - i/o error. |
873 | */ | 873 | */ |
874 | int diFree(struct inode *ip) | 874 | int diFree(struct inode *ip) |
875 | { | 875 | { |
@@ -898,7 +898,7 @@ int diFree(struct inode *ip) | |||
898 | */ | 898 | */ |
899 | iagno = INOTOIAG(inum); | 899 | iagno = INOTOIAG(inum); |
900 | 900 | ||
901 | /* make sure that the iag is contained within | 901 | /* make sure that the iag is contained within |
902 | * the map. | 902 | * the map. |
903 | */ | 903 | */ |
904 | if (iagno >= imap->im_nextiag) { | 904 | if (iagno >= imap->im_nextiag) { |
@@ -1013,7 +1013,7 @@ int diFree(struct inode *ip) | |||
1013 | 1013 | ||
1014 | /* update the free inode summary map for the extent if | 1014 | /* update the free inode summary map for the extent if |
1015 | * freeing the inode means the extent will now have free | 1015 | * freeing the inode means the extent will now have free |
1016 | * inodes (i.e., the inode being freed is the first free | 1016 | * inodes (i.e., the inode being freed is the first free |
1017 | * inode of extent), | 1017 | * inode of extent), |
1018 | */ | 1018 | */ |
1019 | if (iagp->wmap[extno] == cpu_to_le32(ONES)) { | 1019 | if (iagp->wmap[extno] == cpu_to_le32(ONES)) { |
@@ -1204,9 +1204,9 @@ int diFree(struct inode *ip) | |||
1204 | iagp->inofreefwd = iagp->inofreeback = cpu_to_le32(-1); | 1204 | iagp->inofreefwd = iagp->inofreeback = cpu_to_le32(-1); |
1205 | } | 1205 | } |
1206 | 1206 | ||
1207 | /* update the inode extent address and working map | 1207 | /* update the inode extent address and working map |
1208 | * to reflect the free extent. | 1208 | * to reflect the free extent. |
1209 | * the permanent map should have been updated already | 1209 | * the permanent map should have been updated already |
1210 | * for the inode being freed. | 1210 | * for the inode being freed. |
1211 | */ | 1211 | */ |
1212 | if (iagp->pmap[extno] != 0) { | 1212 | if (iagp->pmap[extno] != 0) { |
@@ -1218,7 +1218,7 @@ int diFree(struct inode *ip) | |||
1218 | 1218 | ||
1219 | /* update the free extent and free inode summary maps | 1219 | /* update the free extent and free inode summary maps |
1220 | * to reflect the freed extent. | 1220 | * to reflect the freed extent. |
1221 | * the inode summary map is marked to indicate no inodes | 1221 | * the inode summary map is marked to indicate no inodes |
1222 | * available for the freed extent. | 1222 | * available for the freed extent. |
1223 | */ | 1223 | */ |
1224 | sword = extno >> L2EXTSPERSUM; | 1224 | sword = extno >> L2EXTSPERSUM; |
@@ -1255,17 +1255,17 @@ int diFree(struct inode *ip) | |||
1255 | * start transaction to update block allocation map | 1255 | * start transaction to update block allocation map |
1256 | * for the inode extent freed; | 1256 | * for the inode extent freed; |
1257 | * | 1257 | * |
1258 | * N.B. AG_LOCK is released and iag will be released below, and | 1258 | * N.B. AG_LOCK is released and iag will be released below, and |
1259 | * other thread may allocate inode from/reusing the ixad freed | 1259 | * other thread may allocate inode from/reusing the ixad freed |
1260 | * BUT with new/different backing inode extent from the extent | 1260 | * BUT with new/different backing inode extent from the extent |
1261 | * to be freed by the transaction; | 1261 | * to be freed by the transaction; |
1262 | */ | 1262 | */ |
1263 | tid = txBegin(ipimap->i_sb, COMMIT_FORCE); | 1263 | tid = txBegin(ipimap->i_sb, COMMIT_FORCE); |
1264 | mutex_lock(&JFS_IP(ipimap)->commit_mutex); | 1264 | mutex_lock(&JFS_IP(ipimap)->commit_mutex); |
1265 | 1265 | ||
1266 | /* acquire tlock of the iag page of the freed ixad | 1266 | /* acquire tlock of the iag page of the freed ixad |
1267 | * to force the page NOHOMEOK (even though no data is | 1267 | * to force the page NOHOMEOK (even though no data is |
1268 | * logged from the iag page) until NOREDOPAGE|FREEXTENT log | 1268 | * logged from the iag page) until NOREDOPAGE|FREEXTENT log |
1269 | * for the free of the extent is committed; | 1269 | * for the free of the extent is committed; |
1270 | * write FREEXTENT|NOREDOPAGE log record | 1270 | * write FREEXTENT|NOREDOPAGE log record |
1271 | * N.B. linelock is overlaid as freed extent descriptor; | 1271 | * N.B. linelock is overlaid as freed extent descriptor; |
@@ -1284,8 +1284,8 @@ int diFree(struct inode *ip) | |||
1284 | * logredo needs the IAG number and IAG extent index in order | 1284 | * logredo needs the IAG number and IAG extent index in order |
1285 | * to ensure that the IMap is consistent. The least disruptive | 1285 | * to ensure that the IMap is consistent. The least disruptive |
1286 | * way to pass these values through to the transaction manager | 1286 | * way to pass these values through to the transaction manager |
1287 | * is in the iplist array. | 1287 | * is in the iplist array. |
1288 | * | 1288 | * |
1289 | * It's not pretty, but it works. | 1289 | * It's not pretty, but it works. |
1290 | */ | 1290 | */ |
1291 | iplist[1] = (struct inode *) (size_t)iagno; | 1291 | iplist[1] = (struct inode *) (size_t)iagno; |
@@ -1340,18 +1340,18 @@ diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp) | |||
1340 | /* | 1340 | /* |
1341 | * NAME: diAlloc(pip,dir,ip) | 1341 | * NAME: diAlloc(pip,dir,ip) |
1342 | * | 1342 | * |
1343 | * FUNCTION: allocate a disk inode from the inode working map | 1343 | * FUNCTION: allocate a disk inode from the inode working map |
1344 | * for a fileset or aggregate. | 1344 | * for a fileset or aggregate. |
1345 | * | 1345 | * |
1346 | * PARAMETERS: | 1346 | * PARAMETERS: |
1347 | * pip - pointer to incore inode for the parent inode. | 1347 | * pip - pointer to incore inode for the parent inode. |
1348 | * dir - 'true' if the new disk inode is for a directory. | 1348 | * dir - 'true' if the new disk inode is for a directory. |
1349 | * ip - pointer to a new inode | 1349 | * ip - pointer to a new inode |
1350 | * | 1350 | * |
1351 | * RETURN VALUES: | 1351 | * RETURN VALUES: |
1352 | * 0 - success. | 1352 | * 0 - success. |
1353 | * -ENOSPC - insufficient disk resources. | 1353 | * -ENOSPC - insufficient disk resources. |
1354 | * -EIO - i/o error. | 1354 | * -EIO - i/o error. |
1355 | */ | 1355 | */ |
1356 | int diAlloc(struct inode *pip, bool dir, struct inode *ip) | 1356 | int diAlloc(struct inode *pip, bool dir, struct inode *ip) |
1357 | { | 1357 | { |
@@ -1372,7 +1372,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip) | |||
1372 | JFS_IP(ip)->ipimap = ipimap; | 1372 | JFS_IP(ip)->ipimap = ipimap; |
1373 | JFS_IP(ip)->fileset = FILESYSTEM_I; | 1373 | JFS_IP(ip)->fileset = FILESYSTEM_I; |
1374 | 1374 | ||
1375 | /* for a directory, the allocation policy is to start | 1375 | /* for a directory, the allocation policy is to start |
1376 | * at the ag level using the preferred ag. | 1376 | * at the ag level using the preferred ag. |
1377 | */ | 1377 | */ |
1378 | if (dir) { | 1378 | if (dir) { |
@@ -1435,7 +1435,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip) | |||
1435 | /* | 1435 | /* |
1436 | * try to allocate from the IAG | 1436 | * try to allocate from the IAG |
1437 | */ | 1437 | */ |
1438 | /* check if the inode may be allocated from the iag | 1438 | /* check if the inode may be allocated from the iag |
1439 | * (i.e. the inode has free inodes or new extent can be added). | 1439 | * (i.e. the inode has free inodes or new extent can be added). |
1440 | */ | 1440 | */ |
1441 | if (iagp->nfreeinos || addext) { | 1441 | if (iagp->nfreeinos || addext) { |
@@ -1490,7 +1490,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip) | |||
1490 | * hint or, if appropriate (i.e. addext is true), allocate | 1490 | * hint or, if appropriate (i.e. addext is true), allocate |
1491 | * an extent of free inodes at or following the extent | 1491 | * an extent of free inodes at or following the extent |
1492 | * containing the hint. | 1492 | * containing the hint. |
1493 | * | 1493 | * |
1494 | * the free inode and free extent summary maps are used | 1494 | * the free inode and free extent summary maps are used |
1495 | * here, so determine the starting summary map position | 1495 | * here, so determine the starting summary map position |
1496 | * and the number of words we'll have to examine. again, | 1496 | * and the number of words we'll have to examine. again, |
@@ -1641,7 +1641,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip) | |||
1641 | * inodes should be added for the allocation group, with | 1641 | * inodes should be added for the allocation group, with |
1642 | * the current request satisfied from this extent. if this | 1642 | * the current request satisfied from this extent. if this |
1643 | * is the case, an attempt will be made to do just that. if | 1643 | * is the case, an attempt will be made to do just that. if |
1644 | * this attempt fails or it has been determined that a new | 1644 | * this attempt fails or it has been determined that a new |
1645 | * extent should not be added, an attempt is made to satisfy | 1645 | * extent should not be added, an attempt is made to satisfy |
1646 | * the request by allocating an existing (backed) free inode | 1646 | * the request by allocating an existing (backed) free inode |
1647 | * from the allocation group. | 1647 | * from the allocation group. |
@@ -1649,24 +1649,24 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip) | |||
1649 | * PRE CONDITION: Already have the AG lock for this AG. | 1649 | * PRE CONDITION: Already have the AG lock for this AG. |
1650 | * | 1650 | * |
1651 | * PARAMETERS: | 1651 | * PARAMETERS: |
1652 | * imap - pointer to inode map control structure. | 1652 | * imap - pointer to inode map control structure. |
1653 | * agno - allocation group to allocate from. | 1653 | * agno - allocation group to allocate from. |
1654 | * dir - 'true' if the new disk inode is for a directory. | 1654 | * dir - 'true' if the new disk inode is for a directory. |
1655 | * ip - pointer to the new inode to be filled in on successful return | 1655 | * ip - pointer to the new inode to be filled in on successful return |
1656 | * with the disk inode number allocated, its extent address | 1656 | * with the disk inode number allocated, its extent address |
1657 | * and the start of the ag. | 1657 | * and the start of the ag. |
1658 | * | 1658 | * |
1659 | * RETURN VALUES: | 1659 | * RETURN VALUES: |
1660 | * 0 - success. | 1660 | * 0 - success. |
1661 | * -ENOSPC - insufficient disk resources. | 1661 | * -ENOSPC - insufficient disk resources. |
1662 | * -EIO - i/o error. | 1662 | * -EIO - i/o error. |
1663 | */ | 1663 | */ |
1664 | static int | 1664 | static int |
1665 | diAllocAG(struct inomap * imap, int agno, bool dir, struct inode *ip) | 1665 | diAllocAG(struct inomap * imap, int agno, bool dir, struct inode *ip) |
1666 | { | 1666 | { |
1667 | int rc, addext, numfree, numinos; | 1667 | int rc, addext, numfree, numinos; |
1668 | 1668 | ||
1669 | /* get the number of free and the number of backed disk | 1669 | /* get the number of free and the number of backed disk |
1670 | * inodes currently within the ag. | 1670 | * inodes currently within the ag. |
1671 | */ | 1671 | */ |
1672 | numfree = imap->im_agctl[agno].numfree; | 1672 | numfree = imap->im_agctl[agno].numfree; |
@@ -1719,17 +1719,17 @@ diAllocAG(struct inomap * imap, int agno, bool dir, struct inode *ip) | |||
1719 | * specified primary group. | 1719 | * specified primary group. |
1720 | * | 1720 | * |
1721 | * PARAMETERS: | 1721 | * PARAMETERS: |
1722 | * imap - pointer to inode map control structure. | 1722 | * imap - pointer to inode map control structure. |
1723 | * agno - primary allocation group (to avoid). | 1723 | * agno - primary allocation group (to avoid). |
1724 | * dir - 'true' if the new disk inode is for a directory. | 1724 | * dir - 'true' if the new disk inode is for a directory. |
1725 | * ip - pointer to a new inode to be filled in on successful return | 1725 | * ip - pointer to a new inode to be filled in on successful return |
1726 | * with the disk inode number allocated, its extent address | 1726 | * with the disk inode number allocated, its extent address |
1727 | * and the start of the ag. | 1727 | * and the start of the ag. |
1728 | * | 1728 | * |
1729 | * RETURN VALUES: | 1729 | * RETURN VALUES: |
1730 | * 0 - success. | 1730 | * 0 - success. |
1731 | * -ENOSPC - insufficient disk resources. | 1731 | * -ENOSPC - insufficient disk resources. |
1732 | * -EIO - i/o error. | 1732 | * -EIO - i/o error. |
1733 | */ | 1733 | */ |
1734 | static int | 1734 | static int |
1735 | diAllocAny(struct inomap * imap, int agno, bool dir, struct inode *ip) | 1735 | diAllocAny(struct inomap * imap, int agno, bool dir, struct inode *ip) |
@@ -1738,7 +1738,7 @@ diAllocAny(struct inomap * imap, int agno, bool dir, struct inode *ip) | |||
1738 | int maxag = JFS_SBI(imap->im_ipimap->i_sb)->bmap->db_maxag; | 1738 | int maxag = JFS_SBI(imap->im_ipimap->i_sb)->bmap->db_maxag; |
1739 | 1739 | ||
1740 | 1740 | ||
1741 | /* try to allocate from the ags following agno up to | 1741 | /* try to allocate from the ags following agno up to |
1742 | * the maximum ag number. | 1742 | * the maximum ag number. |
1743 | */ | 1743 | */ |
1744 | for (ag = agno + 1; ag <= maxag; ag++) { | 1744 | for (ag = agno + 1; ag <= maxag; ag++) { |
@@ -1780,21 +1780,21 @@ diAllocAny(struct inomap * imap, int agno, bool dir, struct inode *ip) | |||
1780 | * | 1780 | * |
1781 | * allocation occurs from the first iag on the list using | 1781 | * allocation occurs from the first iag on the list using |
1782 | * the iag's free inode summary map to find the leftmost | 1782 | * the iag's free inode summary map to find the leftmost |
1783 | * free inode in the iag. | 1783 | * free inode in the iag. |
1784 | * | 1784 | * |
1785 | * PRE CONDITION: Already have AG lock for this AG. | 1785 | * PRE CONDITION: Already have AG lock for this AG. |
1786 | * | 1786 | * |
1787 | * PARAMETERS: | 1787 | * PARAMETERS: |
1788 | * imap - pointer to inode map control structure. | 1788 | * imap - pointer to inode map control structure. |
1789 | * agno - allocation group. | 1789 | * agno - allocation group. |
1790 | * ip - pointer to new inode to be filled in on successful return | 1790 | * ip - pointer to new inode to be filled in on successful return |
1791 | * with the disk inode number allocated, its extent address | 1791 | * with the disk inode number allocated, its extent address |
1792 | * and the start of the ag. | 1792 | * and the start of the ag. |
1793 | * | 1793 | * |
1794 | * RETURN VALUES: | 1794 | * RETURN VALUES: |
1795 | * 0 - success. | 1795 | * 0 - success. |
1796 | * -ENOSPC - insufficient disk resources. | 1796 | * -ENOSPC - insufficient disk resources. |
1797 | * -EIO - i/o error. | 1797 | * -EIO - i/o error. |
1798 | */ | 1798 | */ |
1799 | static int diAllocIno(struct inomap * imap, int agno, struct inode *ip) | 1799 | static int diAllocIno(struct inomap * imap, int agno, struct inode *ip) |
1800 | { | 1800 | { |
@@ -1867,7 +1867,7 @@ static int diAllocIno(struct inomap * imap, int agno, struct inode *ip) | |||
1867 | return -EIO; | 1867 | return -EIO; |
1868 | } | 1868 | } |
1869 | 1869 | ||
1870 | /* compute the inode number within the iag. | 1870 | /* compute the inode number within the iag. |
1871 | */ | 1871 | */ |
1872 | ino = (extno << L2INOSPEREXT) + rem; | 1872 | ino = (extno << L2INOSPEREXT) + rem; |
1873 | 1873 | ||
@@ -1892,17 +1892,17 @@ static int diAllocIno(struct inomap * imap, int agno, struct inode *ip) | |||
1892 | /* | 1892 | /* |
1893 | * NAME: diAllocExt(imap,agno,ip) | 1893 | * NAME: diAllocExt(imap,agno,ip) |
1894 | * | 1894 | * |
1895 | * FUNCTION: add a new extent of free inodes to an iag, allocating | 1895 | * FUNCTION: add a new extent of free inodes to an iag, allocating |
1896 | * an inode from this extent to satisfy the current allocation | 1896 | * an inode from this extent to satisfy the current allocation |
1897 | * request. | 1897 | * request. |
1898 | * | 1898 | * |
1899 | * this routine first tries to find an existing iag with free | 1899 | * this routine first tries to find an existing iag with free |
1900 | * extents through the ag free extent list. if list is not | 1900 | * extents through the ag free extent list. if list is not |
1901 | * empty, the head of the list will be selected as the home | 1901 | * empty, the head of the list will be selected as the home |
1902 | * of the new extent of free inodes. otherwise (the list is | 1902 | * of the new extent of free inodes. otherwise (the list is |
1903 | * empty), a new iag will be allocated for the ag to contain | 1903 | * empty), a new iag will be allocated for the ag to contain |
1904 | * the extent. | 1904 | * the extent. |
1905 | * | 1905 | * |
1906 | * once an iag has been selected, the free extent summary map | 1906 | * once an iag has been selected, the free extent summary map |
1907 | * is used to locate a free extent within the iag and diNewExt() | 1907 | * is used to locate a free extent within the iag and diNewExt() |
1908 | * is called to initialize the extent, with initialization | 1908 | * is called to initialize the extent, with initialization |
@@ -1910,16 +1910,16 @@ static int diAllocIno(struct inomap * imap, int agno, struct inode *ip) | |||
1910 | * for the purpose of satisfying this request. | 1910 | * for the purpose of satisfying this request. |
1911 | * | 1911 | * |
1912 | * PARAMETERS: | 1912 | * PARAMETERS: |
1913 | * imap - pointer to inode map control structure. | 1913 | * imap - pointer to inode map control structure. |
1914 | * agno - allocation group number. | 1914 | * agno - allocation group number. |
1915 | * ip - pointer to new inode to be filled in on successful return | 1915 | * ip - pointer to new inode to be filled in on successful return |
1916 | * with the disk inode number allocated, its extent address | 1916 | * with the disk inode number allocated, its extent address |
1917 | * and the start of the ag. | 1917 | * and the start of the ag. |
1918 | * | 1918 | * |
1919 | * RETURN VALUES: | 1919 | * RETURN VALUES: |
1920 | * 0 - success. | 1920 | * 0 - success. |
1921 | * -ENOSPC - insufficient disk resources. | 1921 | * -ENOSPC - insufficient disk resources. |
1922 | * -EIO - i/o error. | 1922 | * -EIO - i/o error. |
1923 | */ | 1923 | */ |
1924 | static int diAllocExt(struct inomap * imap, int agno, struct inode *ip) | 1924 | static int diAllocExt(struct inomap * imap, int agno, struct inode *ip) |
1925 | { | 1925 | { |
@@ -2012,7 +2012,7 @@ static int diAllocExt(struct inomap * imap, int agno, struct inode *ip) | |||
2012 | /* | 2012 | /* |
2013 | * NAME: diAllocBit(imap,iagp,ino) | 2013 | * NAME: diAllocBit(imap,iagp,ino) |
2014 | * | 2014 | * |
2015 | * FUNCTION: allocate a backed inode from an iag. | 2015 | * FUNCTION: allocate a backed inode from an iag. |
2016 | * | 2016 | * |
2017 | * this routine performs the mechanics of allocating a | 2017 | * this routine performs the mechanics of allocating a |
2018 | * specified inode from a backed extent. | 2018 | * specified inode from a backed extent. |
@@ -2025,19 +2025,19 @@ static int diAllocExt(struct inomap * imap, int agno, struct inode *ip) | |||
2025 | * in the face of updates to multiple buffers. under this | 2025 | * in the face of updates to multiple buffers. under this |
2026 | * approach, all required buffers are obtained before making | 2026 | * approach, all required buffers are obtained before making |
2027 | * any updates and are held all are updates are complete. | 2027 | * any updates and are held all are updates are complete. |
2028 | * | 2028 | * |
2029 | * PRE CONDITION: Already have buffer lock on iagp. Already have AG lock on | 2029 | * PRE CONDITION: Already have buffer lock on iagp. Already have AG lock on |
2030 | * this AG. Must have read lock on imap inode. | 2030 | * this AG. Must have read lock on imap inode. |
2031 | * | 2031 | * |
2032 | * PARAMETERS: | 2032 | * PARAMETERS: |
2033 | * imap - pointer to inode map control structure. | 2033 | * imap - pointer to inode map control structure. |
2034 | * iagp - pointer to iag. | 2034 | * iagp - pointer to iag. |
2035 | * ino - inode number to be allocated within the iag. | 2035 | * ino - inode number to be allocated within the iag. |
2036 | * | 2036 | * |
2037 | * RETURN VALUES: | 2037 | * RETURN VALUES: |
2038 | * 0 - success. | 2038 | * 0 - success. |
2039 | * -ENOSPC - insufficient disk resources. | 2039 | * -ENOSPC - insufficient disk resources. |
2040 | * -EIO - i/o error. | 2040 | * -EIO - i/o error. |
2041 | */ | 2041 | */ |
2042 | static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino) | 2042 | static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino) |
2043 | { | 2043 | { |
@@ -2172,19 +2172,19 @@ static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino) | |||
2172 | * buffers. under this approach, all required buffers are | 2172 | * buffers. under this approach, all required buffers are |
2173 | * obtained before making any updates and are held until all | 2173 | * obtained before making any updates and are held until all |
2174 | * updates are complete. | 2174 | * updates are complete. |
2175 | * | 2175 | * |
2176 | * PRE CONDITION: Already have buffer lock on iagp. Already have AG lock on | 2176 | * PRE CONDITION: Already have buffer lock on iagp. Already have AG lock on |
2177 | * this AG. Must have read lock on imap inode. | 2177 | * this AG. Must have read lock on imap inode. |
2178 | * | 2178 | * |
2179 | * PARAMETERS: | 2179 | * PARAMETERS: |
2180 | * imap - pointer to inode map control structure. | 2180 | * imap - pointer to inode map control structure. |
2181 | * iagp - pointer to iag. | 2181 | * iagp - pointer to iag. |
2182 | * extno - extent number. | 2182 | * extno - extent number. |
2183 | * | 2183 | * |
2184 | * RETURN VALUES: | 2184 | * RETURN VALUES: |
2185 | * 0 - success. | 2185 | * 0 - success. |
2186 | * -ENOSPC - insufficient disk resources. | 2186 | * -ENOSPC - insufficient disk resources. |
2187 | * -EIO - i/o error. | 2187 | * -EIO - i/o error. |
2188 | */ | 2188 | */ |
2189 | static int diNewExt(struct inomap * imap, struct iag * iagp, int extno) | 2189 | static int diNewExt(struct inomap * imap, struct iag * iagp, int extno) |
2190 | { | 2190 | { |
@@ -2432,34 +2432,34 @@ static int diNewExt(struct inomap * imap, struct iag * iagp, int extno) | |||
2432 | /* | 2432 | /* |
2433 | * NAME: diNewIAG(imap,iagnop,agno) | 2433 | * NAME: diNewIAG(imap,iagnop,agno) |
2434 | * | 2434 | * |
2435 | * FUNCTION: allocate a new iag for an allocation group. | 2435 | * FUNCTION: allocate a new iag for an allocation group. |
2436 | * | 2436 | * |
2437 | * first tries to allocate the iag from the inode map | 2437 | * first tries to allocate the iag from the inode map |
2438 | * iagfree list: | 2438 | * iagfree list: |
2439 | * if the list has free iags, the head of the list is removed | 2439 | * if the list has free iags, the head of the list is removed |
2440 | * and returned to satisfy the request. | 2440 | * and returned to satisfy the request. |
2441 | * if the inode map's iag free list is empty, the inode map | 2441 | * if the inode map's iag free list is empty, the inode map |
2442 | * is extended to hold a new iag. this new iag is initialized | 2442 | * is extended to hold a new iag. this new iag is initialized |
2443 | * and returned to satisfy the request. | 2443 | * and returned to satisfy the request. |
2444 | * | 2444 | * |
2445 | * PARAMETERS: | 2445 | * PARAMETERS: |
2446 | * imap - pointer to inode map control structure. | 2446 | * imap - pointer to inode map control structure. |
2447 | * iagnop - pointer to an iag number set with the number of the | 2447 | * iagnop - pointer to an iag number set with the number of the |
2448 | * newly allocated iag upon successful return. | 2448 | * newly allocated iag upon successful return. |
2449 | * agno - allocation group number. | 2449 | * agno - allocation group number. |
2450 | * bpp - Buffer pointer to be filled in with new IAG's buffer | 2450 | * bpp - Buffer pointer to be filled in with new IAG's buffer |
2451 | * | 2451 | * |
2452 | * RETURN VALUES: | 2452 | * RETURN VALUES: |
2453 | * 0 - success. | 2453 | * 0 - success. |
2454 | * -ENOSPC - insufficient disk resources. | 2454 | * -ENOSPC - insufficient disk resources. |
2455 | * -EIO - i/o error. | 2455 | * -EIO - i/o error. |
2456 | * | 2456 | * |
2457 | * serialization: | 2457 | * serialization: |
2458 | * AG lock held on entry/exit; | 2458 | * AG lock held on entry/exit; |
2459 | * write lock on the map is held inside; | 2459 | * write lock on the map is held inside; |
2460 | * read lock on the map is held on successful completion; | 2460 | * read lock on the map is held on successful completion; |
2461 | * | 2461 | * |
2462 | * note: new iag transaction: | 2462 | * note: new iag transaction: |
2463 | * . synchronously write iag; | 2463 | * . synchronously write iag; |
2464 | * . write log of xtree and inode of imap; | 2464 | * . write log of xtree and inode of imap; |
2465 | * . commit; | 2465 | * . commit; |
@@ -2494,7 +2494,7 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp) | |||
2494 | /* acquire the free iag lock */ | 2494 | /* acquire the free iag lock */ |
2495 | IAGFREE_LOCK(imap); | 2495 | IAGFREE_LOCK(imap); |
2496 | 2496 | ||
2497 | /* if there are any iags on the inode map free iag list, | 2497 | /* if there are any iags on the inode map free iag list, |
2498 | * allocate the iag from the head of the list. | 2498 | * allocate the iag from the head of the list. |
2499 | */ | 2499 | */ |
2500 | if (imap->im_freeiag >= 0) { | 2500 | if (imap->im_freeiag >= 0) { |
@@ -2618,8 +2618,8 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp) | |||
2618 | flush_metapage(mp); | 2618 | flush_metapage(mp); |
2619 | 2619 | ||
2620 | /* | 2620 | /* |
2621 | * txCommit(COMMIT_FORCE) will synchronously write address | 2621 | * txCommit(COMMIT_FORCE) will synchronously write address |
2622 | * index pages and inode after commit in careful update order | 2622 | * index pages and inode after commit in careful update order |
2623 | * of address index pages (right to left, bottom up); | 2623 | * of address index pages (right to left, bottom up); |
2624 | */ | 2624 | */ |
2625 | iplist[0] = ipimap; | 2625 | iplist[0] = ipimap; |
@@ -2678,11 +2678,11 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp) | |||
2678 | * | 2678 | * |
2679 | * FUNCTION: get the buffer for the specified iag within a fileset | 2679 | * FUNCTION: get the buffer for the specified iag within a fileset |
2680 | * or aggregate inode map. | 2680 | * or aggregate inode map. |
2681 | * | 2681 | * |
2682 | * PARAMETERS: | 2682 | * PARAMETERS: |
2683 | * imap - pointer to inode map control structure. | 2683 | * imap - pointer to inode map control structure. |
2684 | * iagno - iag number. | 2684 | * iagno - iag number. |
2685 | * bpp - point to buffer pointer to be filled in on successful | 2685 | * bpp - point to buffer pointer to be filled in on successful |
2686 | * exit. | 2686 | * exit. |
2687 | * | 2687 | * |
2688 | * SERIALIZATION: | 2688 | * SERIALIZATION: |
@@ -2692,7 +2692,7 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp) | |||
2692 | * | 2692 | * |
2693 | * RETURN VALUES: | 2693 | * RETURN VALUES: |
2694 | * 0 - success. | 2694 | * 0 - success. |
2695 | * -EIO - i/o error. | 2695 | * -EIO - i/o error. |
2696 | */ | 2696 | */ |
2697 | static int diIAGRead(struct inomap * imap, int iagno, struct metapage ** mpp) | 2697 | static int diIAGRead(struct inomap * imap, int iagno, struct metapage ** mpp) |
2698 | { | 2698 | { |
@@ -2718,8 +2718,8 @@ static int diIAGRead(struct inomap * imap, int iagno, struct metapage ** mpp) | |||
2718 | * the specified bit position. | 2718 | * the specified bit position. |
2719 | * | 2719 | * |
2720 | * PARAMETERS: | 2720 | * PARAMETERS: |
2721 | * word - word to be examined. | 2721 | * word - word to be examined. |
2722 | * start - starting bit position. | 2722 | * start - starting bit position. |
2723 | * | 2723 | * |
2724 | * RETURN VALUES: | 2724 | * RETURN VALUES: |
2725 | * bit position of first free bit in the word or 32 if | 2725 | * bit position of first free bit in the word or 32 if |
@@ -2740,10 +2740,10 @@ static int diFindFree(u32 word, int start) | |||
2740 | 2740 | ||
2741 | /* | 2741 | /* |
2742 | * NAME: diUpdatePMap() | 2742 | * NAME: diUpdatePMap() |
2743 | * | 2743 | * |
2744 | * FUNCTION: Update the persistent map in an IAG for the allocation or | 2744 | * FUNCTION: Update the persistent map in an IAG for the allocation or |
2745 | * freeing of the specified inode. | 2745 | * freeing of the specified inode. |
2746 | * | 2746 | * |
2747 | * PRE CONDITIONS: Working map has already been updated for allocate. | 2747 | * PRE CONDITIONS: Working map has already been updated for allocate. |
2748 | * | 2748 | * |
2749 | * PARAMETERS: | 2749 | * PARAMETERS: |
@@ -2752,7 +2752,7 @@ static int diFindFree(u32 word, int start) | |||
2752 | * is_free - If 'true' indicates inode should be marked freed, otherwise | 2752 | * is_free - If 'true' indicates inode should be marked freed, otherwise |
2753 | * indicates inode should be marked allocated. | 2753 | * indicates inode should be marked allocated. |
2754 | * | 2754 | * |
2755 | * RETURN VALUES: | 2755 | * RETURN VALUES: |
2756 | * 0 for success | 2756 | * 0 for success |
2757 | */ | 2757 | */ |
2758 | int | 2758 | int |
@@ -2793,7 +2793,7 @@ diUpdatePMap(struct inode *ipimap, | |||
2793 | extno = ino >> L2INOSPEREXT; | 2793 | extno = ino >> L2INOSPEREXT; |
2794 | bitno = ino & (INOSPEREXT - 1); | 2794 | bitno = ino & (INOSPEREXT - 1); |
2795 | mask = HIGHORDER >> bitno; | 2795 | mask = HIGHORDER >> bitno; |
2796 | /* | 2796 | /* |
2797 | * mark the inode free in persistent map: | 2797 | * mark the inode free in persistent map: |
2798 | */ | 2798 | */ |
2799 | if (is_free) { | 2799 | if (is_free) { |
@@ -2803,7 +2803,7 @@ diUpdatePMap(struct inode *ipimap, | |||
2803 | * of last reference release; | 2803 | * of last reference release; |
2804 | */ | 2804 | */ |
2805 | if (!(le32_to_cpu(iagp->wmap[extno]) & mask)) { | 2805 | if (!(le32_to_cpu(iagp->wmap[extno]) & mask)) { |
2806 | jfs_error(ipimap->i_sb, | 2806 | jfs_error(ipimap->i_sb, |
2807 | "diUpdatePMap: inode %ld not marked as " | 2807 | "diUpdatePMap: inode %ld not marked as " |
2808 | "allocated in wmap!", inum); | 2808 | "allocated in wmap!", inum); |
2809 | } | 2809 | } |
@@ -2877,8 +2877,8 @@ diUpdatePMap(struct inode *ipimap, | |||
2877 | * diExtendFS() | 2877 | * diExtendFS() |
2878 | * | 2878 | * |
2879 | * function: update imap for extendfs(); | 2879 | * function: update imap for extendfs(); |
2880 | * | 2880 | * |
2881 | * note: AG size has been increased s.t. each k old contiguous AGs are | 2881 | * note: AG size has been increased s.t. each k old contiguous AGs are |
2882 | * coalesced into a new AG; | 2882 | * coalesced into a new AG; |
2883 | */ | 2883 | */ |
2884 | int diExtendFS(struct inode *ipimap, struct inode *ipbmap) | 2884 | int diExtendFS(struct inode *ipimap, struct inode *ipbmap) |
@@ -2897,7 +2897,7 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap) | |||
2897 | atomic_read(&imap->im_numfree)); | 2897 | atomic_read(&imap->im_numfree)); |
2898 | 2898 | ||
2899 | /* | 2899 | /* |
2900 | * reconstruct imap | 2900 | * reconstruct imap |
2901 | * | 2901 | * |
2902 | * coalesce contiguous k (newAGSize/oldAGSize) AGs; | 2902 | * coalesce contiguous k (newAGSize/oldAGSize) AGs; |
2903 | * i.e., (AGi, ..., AGj) where i = k*n and j = k*(n+1) - 1 to AGn; | 2903 | * i.e., (AGi, ..., AGj) where i = k*n and j = k*(n+1) - 1 to AGn; |
@@ -2931,7 +2931,7 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap) | |||
2931 | } | 2931 | } |
2932 | 2932 | ||
2933 | /* leave free iag in the free iag list */ | 2933 | /* leave free iag in the free iag list */ |
2934 | if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG)) { | 2934 | if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG)) { |
2935 | release_metapage(bp); | 2935 | release_metapage(bp); |
2936 | continue; | 2936 | continue; |
2937 | } | 2937 | } |
diff --git a/fs/jfs/jfs_imap.h b/fs/jfs/jfs_imap.h index e3b7db47db6b..4f9c346ed498 100644 --- a/fs/jfs/jfs_imap.h +++ b/fs/jfs/jfs_imap.h | |||
@@ -1,18 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2000-2002 | 2 | * Copyright (C) International Business Machines Corp., 2000-2002 |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_IMAP | 18 | #ifndef _H_JFS_IMAP |
@@ -45,13 +45,13 @@ | |||
45 | /* get the starting block number of the 4K page of an inode extent | 45 | /* get the starting block number of the 4K page of an inode extent |
46 | * that contains ino. | 46 | * that contains ino. |
47 | */ | 47 | */ |
48 | #define INOPBLK(pxd,ino,l2nbperpg) (addressPXD((pxd)) + \ | 48 | #define INOPBLK(pxd,ino,l2nbperpg) (addressPXD((pxd)) + \ |
49 | ((((ino) & (INOSPEREXT-1)) >> L2INOSPERPAGE) << (l2nbperpg))) | 49 | ((((ino) & (INOSPEREXT-1)) >> L2INOSPERPAGE) << (l2nbperpg))) |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * inode allocation map: | 52 | * inode allocation map: |
53 | * | 53 | * |
54 | * inode allocation map consists of | 54 | * inode allocation map consists of |
55 | * . the inode map control page and | 55 | * . the inode map control page and |
56 | * . inode allocation group pages (per 4096 inodes) | 56 | * . inode allocation group pages (per 4096 inodes) |
57 | * which are addressed by standard JFS xtree. | 57 | * which are addressed by standard JFS xtree. |
diff --git a/fs/jfs/jfs_incore.h b/fs/jfs/jfs_incore.h index 54d73716ca8c..94005584445a 100644 --- a/fs/jfs/jfs_incore.h +++ b/fs/jfs/jfs_incore.h | |||
@@ -4,18 +4,18 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | #ifndef _H_JFS_INCORE | 19 | #ifndef _H_JFS_INCORE |
20 | #define _H_JFS_INCORE | 20 | #define _H_JFS_INCORE |
21 | 21 | ||
diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c index dbf0f77c7a4a..4c67ed97682b 100644 --- a/fs/jfs/jfs_inode.c +++ b/fs/jfs/jfs_inode.c | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
diff --git a/fs/jfs/jfs_inode.h b/fs/jfs/jfs_inode.h index 1fc48df670c8..0d06ccfaff0e 100644 --- a/fs/jfs/jfs_inode.h +++ b/fs/jfs/jfs_inode.h | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_INODE | 18 | #ifndef _H_JFS_INODE |
diff --git a/fs/jfs/jfs_lock.h b/fs/jfs/jfs_lock.h index 70ac9f7d1e00..7d78e83d7c40 100644 --- a/fs/jfs/jfs_lock.h +++ b/fs/jfs/jfs_lock.h | |||
@@ -1,19 +1,19 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2000-2001 | 2 | * Copyright (C) International Business Machines Corp., 2000-2001 |
3 | * Portions Copyright (c) Christoph Hellwig, 2001-2002 | 3 | * Portions Copyright (C) Christoph Hellwig, 2001-2002 |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | #ifndef _H_JFS_LOCK | 19 | #ifndef _H_JFS_LOCK |
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 3315f0b1fbc0..b89c9aba0466 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c | |||
@@ -4,16 +4,16 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
@@ -337,7 +337,7 @@ int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, | |||
337 | * PARAMETER: cd - commit descriptor | 337 | * PARAMETER: cd - commit descriptor |
338 | * | 338 | * |
339 | * RETURN: end-of-log address | 339 | * RETURN: end-of-log address |
340 | * | 340 | * |
341 | * serialization: LOG_LOCK() held on entry/exit | 341 | * serialization: LOG_LOCK() held on entry/exit |
342 | */ | 342 | */ |
343 | static int | 343 | static int |
@@ -554,7 +554,7 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, | |||
554 | * PARAMETER: log | 554 | * PARAMETER: log |
555 | * | 555 | * |
556 | * RETURN: 0 | 556 | * RETURN: 0 |
557 | * | 557 | * |
558 | * serialization: LOG_LOCK() held on entry/exit | 558 | * serialization: LOG_LOCK() held on entry/exit |
559 | */ | 559 | */ |
560 | static int lmNextPage(struct jfs_log * log) | 560 | static int lmNextPage(struct jfs_log * log) |
@@ -656,7 +656,7 @@ static int lmNextPage(struct jfs_log * log) | |||
656 | * page number - redrive pageout of the page at the head of | 656 | * page number - redrive pageout of the page at the head of |
657 | * pageout queue until full page has been written. | 657 | * pageout queue until full page has been written. |
658 | * | 658 | * |
659 | * RETURN: | 659 | * RETURN: |
660 | * | 660 | * |
661 | * NOTE: | 661 | * NOTE: |
662 | * LOGGC_LOCK serializes log group commit queue, and | 662 | * LOGGC_LOCK serializes log group commit queue, and |
@@ -920,10 +920,10 @@ static void lmPostGC(struct lbuf * bp) | |||
920 | * this code is called again. | 920 | * this code is called again. |
921 | * | 921 | * |
922 | * PARAMETERS: log - log structure | 922 | * PARAMETERS: log - log structure |
923 | * hard_sync - 1 to force all metadata to be written | 923 | * hard_sync - 1 to force all metadata to be written |
924 | * | 924 | * |
925 | * RETURN: 0 | 925 | * RETURN: 0 |
926 | * | 926 | * |
927 | * serialization: LOG_LOCK() held on entry/exit | 927 | * serialization: LOG_LOCK() held on entry/exit |
928 | */ | 928 | */ |
929 | static int lmLogSync(struct jfs_log * log, int hard_sync) | 929 | static int lmLogSync(struct jfs_log * log, int hard_sync) |
@@ -1052,7 +1052,7 @@ static int lmLogSync(struct jfs_log * log, int hard_sync) | |||
1052 | * FUNCTION: write log SYNCPT record for specified log | 1052 | * FUNCTION: write log SYNCPT record for specified log |
1053 | * | 1053 | * |
1054 | * PARAMETERS: log - log structure | 1054 | * PARAMETERS: log - log structure |
1055 | * hard_sync - set to 1 to force metadata to be written | 1055 | * hard_sync - set to 1 to force metadata to be written |
1056 | */ | 1056 | */ |
1057 | void jfs_syncpt(struct jfs_log *log, int hard_sync) | 1057 | void jfs_syncpt(struct jfs_log *log, int hard_sync) |
1058 | { LOG_LOCK(log); | 1058 | { LOG_LOCK(log); |
@@ -1067,7 +1067,7 @@ void jfs_syncpt(struct jfs_log *log, int hard_sync) | |||
1067 | * insert filesystem in the active list of the log. | 1067 | * insert filesystem in the active list of the log. |
1068 | * | 1068 | * |
1069 | * PARAMETER: ipmnt - file system mount inode | 1069 | * PARAMETER: ipmnt - file system mount inode |
1070 | * iplog - log inode (out) | 1070 | * iplog - log inode (out) |
1071 | * | 1071 | * |
1072 | * RETURN: | 1072 | * RETURN: |
1073 | * | 1073 | * |
@@ -1082,7 +1082,7 @@ int lmLogOpen(struct super_block *sb) | |||
1082 | 1082 | ||
1083 | if (sbi->flag & JFS_NOINTEGRITY) | 1083 | if (sbi->flag & JFS_NOINTEGRITY) |
1084 | return open_dummy_log(sb); | 1084 | return open_dummy_log(sb); |
1085 | 1085 | ||
1086 | if (sbi->mntflag & JFS_INLINELOG) | 1086 | if (sbi->mntflag & JFS_INLINELOG) |
1087 | return open_inline_log(sb); | 1087 | return open_inline_log(sb); |
1088 | 1088 | ||
@@ -1131,7 +1131,7 @@ int lmLogOpen(struct super_block *sb) | |||
1131 | 1131 | ||
1132 | log->bdev = bdev; | 1132 | log->bdev = bdev; |
1133 | memcpy(log->uuid, sbi->loguuid, sizeof(log->uuid)); | 1133 | memcpy(log->uuid, sbi->loguuid, sizeof(log->uuid)); |
1134 | 1134 | ||
1135 | /* | 1135 | /* |
1136 | * initialize log: | 1136 | * initialize log: |
1137 | */ | 1137 | */ |
@@ -1253,13 +1253,13 @@ static int open_dummy_log(struct super_block *sb) | |||
1253 | * initialize the log from log superblock. | 1253 | * initialize the log from log superblock. |
1254 | * set the log state in the superblock to LOGMOUNT and | 1254 | * set the log state in the superblock to LOGMOUNT and |
1255 | * write SYNCPT log record. | 1255 | * write SYNCPT log record. |
1256 | * | 1256 | * |
1257 | * PARAMETER: log - log structure | 1257 | * PARAMETER: log - log structure |
1258 | * | 1258 | * |
1259 | * RETURN: 0 - if ok | 1259 | * RETURN: 0 - if ok |
1260 | * -EINVAL - bad log magic number or superblock dirty | 1260 | * -EINVAL - bad log magic number or superblock dirty |
1261 | * error returned from logwait() | 1261 | * error returned from logwait() |
1262 | * | 1262 | * |
1263 | * serialization: single first open thread | 1263 | * serialization: single first open thread |
1264 | */ | 1264 | */ |
1265 | int lmLogInit(struct jfs_log * log) | 1265 | int lmLogInit(struct jfs_log * log) |
@@ -1297,7 +1297,7 @@ int lmLogInit(struct jfs_log * log) | |||
1297 | 1297 | ||
1298 | if (!test_bit(log_INLINELOG, &log->flag)) | 1298 | if (!test_bit(log_INLINELOG, &log->flag)) |
1299 | log->l2bsize = L2LOGPSIZE; | 1299 | log->l2bsize = L2LOGPSIZE; |
1300 | 1300 | ||
1301 | /* check for disabled journaling to disk */ | 1301 | /* check for disabled journaling to disk */ |
1302 | if (log->no_integrity) { | 1302 | if (log->no_integrity) { |
1303 | /* | 1303 | /* |
@@ -1651,7 +1651,7 @@ void jfs_flush_journal(struct jfs_log *log, int wait) | |||
1651 | * PARAMETER: log - log inode | 1651 | * PARAMETER: log - log inode |
1652 | * | 1652 | * |
1653 | * RETURN: 0 - success | 1653 | * RETURN: 0 - success |
1654 | * | 1654 | * |
1655 | * serialization: single last close thread | 1655 | * serialization: single last close thread |
1656 | */ | 1656 | */ |
1657 | int lmLogShutdown(struct jfs_log * log) | 1657 | int lmLogShutdown(struct jfs_log * log) |
@@ -1677,7 +1677,7 @@ int lmLogShutdown(struct jfs_log * log) | |||
1677 | lrd.type = cpu_to_le16(LOG_SYNCPT); | 1677 | lrd.type = cpu_to_le16(LOG_SYNCPT); |
1678 | lrd.length = 0; | 1678 | lrd.length = 0; |
1679 | lrd.log.syncpt.sync = 0; | 1679 | lrd.log.syncpt.sync = 0; |
1680 | 1680 | ||
1681 | lsn = lmWriteRecord(log, NULL, &lrd, NULL); | 1681 | lsn = lmWriteRecord(log, NULL, &lrd, NULL); |
1682 | bp = log->bp; | 1682 | bp = log->bp; |
1683 | lp = (struct logpage *) bp->l_ldata; | 1683 | lp = (struct logpage *) bp->l_ldata; |
@@ -1703,7 +1703,7 @@ int lmLogShutdown(struct jfs_log * log) | |||
1703 | jfs_info("lmLogShutdown: lsn:0x%x page:%d eor:%d", | 1703 | jfs_info("lmLogShutdown: lsn:0x%x page:%d eor:%d", |
1704 | lsn, log->page, log->eor); | 1704 | lsn, log->page, log->eor); |
1705 | 1705 | ||
1706 | out: | 1706 | out: |
1707 | /* | 1707 | /* |
1708 | * shutdown per log i/o | 1708 | * shutdown per log i/o |
1709 | */ | 1709 | */ |
@@ -1769,7 +1769,7 @@ static int lmLogFileSystem(struct jfs_log * log, struct jfs_sb_info *sbi, | |||
1769 | lbmFree(bpsuper); | 1769 | lbmFree(bpsuper); |
1770 | return -EIO; | 1770 | return -EIO; |
1771 | } | 1771 | } |
1772 | 1772 | ||
1773 | } | 1773 | } |
1774 | 1774 | ||
1775 | /* | 1775 | /* |
diff --git a/fs/jfs/jfs_logmgr.h b/fs/jfs/jfs_logmgr.h index 8c6909b80014..a53fb17ea219 100644 --- a/fs/jfs/jfs_logmgr.h +++ b/fs/jfs/jfs_logmgr.h | |||
@@ -4,16 +4,16 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | #ifndef _H_JFS_LOGMGR | 19 | #ifndef _H_JFS_LOGMGR |
@@ -35,19 +35,19 @@ | |||
35 | /* | 35 | /* |
36 | * log logical volume | 36 | * log logical volume |
37 | * | 37 | * |
38 | * a log is used to make the commit operation on journalled | 38 | * a log is used to make the commit operation on journalled |
39 | * files within the same logical volume group atomic. | 39 | * files within the same logical volume group atomic. |
40 | * a log is implemented with a logical volume. | 40 | * a log is implemented with a logical volume. |
41 | * there is one log per logical volume group. | 41 | * there is one log per logical volume group. |
42 | * | 42 | * |
43 | * block 0 of the log logical volume is not used (ipl etc). | 43 | * block 0 of the log logical volume is not used (ipl etc). |
44 | * block 1 contains a log "superblock" and is used by logFormat(), | 44 | * block 1 contains a log "superblock" and is used by logFormat(), |
45 | * lmLogInit(), lmLogShutdown(), and logRedo() to record status | 45 | * lmLogInit(), lmLogShutdown(), and logRedo() to record status |
46 | * of the log but is not otherwise used during normal processing. | 46 | * of the log but is not otherwise used during normal processing. |
47 | * blocks 2 - (N-1) are used to contain log records. | 47 | * blocks 2 - (N-1) are used to contain log records. |
48 | * | 48 | * |
49 | * when a volume group is varied-on-line, logRedo() must have | 49 | * when a volume group is varied-on-line, logRedo() must have |
50 | * been executed before the file systems (logical volumes) in | 50 | * been executed before the file systems (logical volumes) in |
51 | * the volume group can be mounted. | 51 | * the volume group can be mounted. |
52 | */ | 52 | */ |
53 | /* | 53 | /* |
@@ -97,26 +97,26 @@ struct logsuper { | |||
97 | * log logical page | 97 | * log logical page |
98 | * | 98 | * |
99 | * (this comment should be rewritten !) | 99 | * (this comment should be rewritten !) |
100 | * the header and trailer structures (h,t) will normally have | 100 | * the header and trailer structures (h,t) will normally have |
101 | * the same page and eor value. | 101 | * the same page and eor value. |
102 | * An exception to this occurs when a complete page write is not | 102 | * An exception to this occurs when a complete page write is not |
103 | * accomplished on a power failure. Since the hardware may "split write" | 103 | * accomplished on a power failure. Since the hardware may "split write" |
104 | * sectors in the page, any out of order sequence may occur during powerfail | 104 | * sectors in the page, any out of order sequence may occur during powerfail |
105 | * and needs to be recognized during log replay. The xor value is | 105 | * and needs to be recognized during log replay. The xor value is |
106 | * an "exclusive or" of all log words in the page up to eor. This | 106 | * an "exclusive or" of all log words in the page up to eor. This |
107 | * 32 bit eor is stored with the top 16 bits in the header and the | 107 | * 32 bit eor is stored with the top 16 bits in the header and the |
108 | * bottom 16 bits in the trailer. logredo can easily recognize pages | 108 | * bottom 16 bits in the trailer. logredo can easily recognize pages |
109 | * that were not completed by reconstructing this eor and checking | 109 | * that were not completed by reconstructing this eor and checking |
110 | * the log page. | 110 | * the log page. |
111 | * | 111 | * |
112 | * Previous versions of the operating system did not allow split | 112 | * Previous versions of the operating system did not allow split |
113 | * writes and detected partially written records in logredo by | 113 | * writes and detected partially written records in logredo by |
114 | * ordering the updates to the header, trailer, and the move of data | 114 | * ordering the updates to the header, trailer, and the move of data |
115 | * into the logdata area. The order: (1) data is moved (2) header | 115 | * into the logdata area. The order: (1) data is moved (2) header |
116 | * is updated (3) trailer is updated. In logredo, when the header | 116 | * is updated (3) trailer is updated. In logredo, when the header |
117 | * differed from the trailer, the header and trailer were reconciled | 117 | * differed from the trailer, the header and trailer were reconciled |
118 | * as follows: if h.page != t.page they were set to the smaller of | 118 | * as follows: if h.page != t.page they were set to the smaller of |
119 | * the two and h.eor and t.eor set to 8 (i.e. empty page). if (only) | 119 | * the two and h.eor and t.eor set to 8 (i.e. empty page). if (only) |
120 | * h.eor != t.eor they were set to the smaller of their two values. | 120 | * h.eor != t.eor they were set to the smaller of their two values. |
121 | */ | 121 | */ |
122 | struct logpage { | 122 | struct logpage { |
@@ -147,20 +147,20 @@ struct logpage { | |||
147 | * in a page, pages are written to temporary paging space if | 147 | * in a page, pages are written to temporary paging space if |
148 | * if they must be written to disk before commit, and i/o is | 148 | * if they must be written to disk before commit, and i/o is |
149 | * scheduled for modified pages to their home location after | 149 | * scheduled for modified pages to their home location after |
150 | * the log records containing the after values and the commit | 150 | * the log records containing the after values and the commit |
151 | * record is written to the log on disk, undo discards the copy | 151 | * record is written to the log on disk, undo discards the copy |
152 | * in main-memory.) | 152 | * in main-memory.) |
153 | * | 153 | * |
154 | * a log record consists of a data area of variable length followed by | 154 | * a log record consists of a data area of variable length followed by |
155 | * a descriptor of fixed size LOGRDSIZE bytes. | 155 | * a descriptor of fixed size LOGRDSIZE bytes. |
156 | * the data area is rounded up to an integral number of 4-bytes and | 156 | * the data area is rounded up to an integral number of 4-bytes and |
157 | * must be no longer than LOGPSIZE. | 157 | * must be no longer than LOGPSIZE. |
158 | * the descriptor is of size of multiple of 4-bytes and aligned on a | 158 | * the descriptor is of size of multiple of 4-bytes and aligned on a |
159 | * 4-byte boundary. | 159 | * 4-byte boundary. |
160 | * records are packed one after the other in the data area of log pages. | 160 | * records are packed one after the other in the data area of log pages. |
161 | * (sometimes a DUMMY record is inserted so that at least one record ends | 161 | * (sometimes a DUMMY record is inserted so that at least one record ends |
162 | * on every page or the longest record is placed on at most two pages). | 162 | * on every page or the longest record is placed on at most two pages). |
163 | * the field eor in page header/trailer points to the byte following | 163 | * the field eor in page header/trailer points to the byte following |
164 | * the last record on a page. | 164 | * the last record on a page. |
165 | */ | 165 | */ |
166 | 166 | ||
@@ -270,11 +270,11 @@ struct lrd { | |||
270 | /* | 270 | /* |
271 | * NOREDOINOEXT: the inode extent is freed | 271 | * NOREDOINOEXT: the inode extent is freed |
272 | * | 272 | * |
273 | * do not apply after-image records which precede this | 273 | * do not apply after-image records which precede this |
274 | * record in the log with the any of the 4 page block | 274 | * record in the log with the any of the 4 page block |
275 | * numbers in this inode extent. | 275 | * numbers in this inode extent. |
276 | * | 276 | * |
277 | * NOTE: The fileset and pxd fields MUST remain in | 277 | * NOTE: The fileset and pxd fields MUST remain in |
278 | * the same fields in the REDOPAGE record format. | 278 | * the same fields in the REDOPAGE record format. |
279 | * | 279 | * |
280 | */ | 280 | */ |
@@ -319,12 +319,10 @@ struct lrd { | |||
319 | * do not apply records which precede this record in the log | 319 | * do not apply records which precede this record in the log |
320 | * with the same inode number. | 320 | * with the same inode number. |
321 | * | 321 | * |
322 | * NOREDILE must be the first to be written at commit | 322 | * NOREDOFILE must be the first to be written at commit |
323 | * (last to be read in logredo()) - it prevents | 323 | * (last to be read in logredo()) - it prevents |
324 | * replay of preceding updates of all preceding generations | 324 | * replay of preceding updates of all preceding generations |
325 | * of the inumber esp. the on-disk inode itself, | 325 | * of the inumber esp. the on-disk inode itself. |
326 | * but does NOT prevent | ||
327 | * replay of the | ||
328 | */ | 326 | */ |
329 | struct { | 327 | struct { |
330 | __le32 fileset; /* 4: fileset number */ | 328 | __le32 fileset; /* 4: fileset number */ |
@@ -332,7 +330,7 @@ struct lrd { | |||
332 | } noredofile; | 330 | } noredofile; |
333 | 331 | ||
334 | /* | 332 | /* |
335 | * ? NEWPAGE: | 333 | * ? NEWPAGE: |
336 | * | 334 | * |
337 | * metadata type dependent | 335 | * metadata type dependent |
338 | */ | 336 | */ |
@@ -464,7 +462,7 @@ struct lbuf { | |||
464 | s64 l_blkno; /* 8: log page block number */ | 462 | s64 l_blkno; /* 8: log page block number */ |
465 | caddr_t l_ldata; /* 4: data page */ | 463 | caddr_t l_ldata; /* 4: data page */ |
466 | struct page *l_page; /* The page itself */ | 464 | struct page *l_page; /* The page itself */ |
467 | uint l_offset; /* Offset of l_ldata within the page */ | 465 | uint l_offset; /* Offset of l_ldata within the page */ |
468 | 466 | ||
469 | wait_queue_head_t l_ioevent; /* 4: i/o done event */ | 467 | wait_queue_head_t l_ioevent; /* 4: i/o done event */ |
470 | }; | 468 | }; |
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index f5afc129d6b1..0cccd1c39d75 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c | |||
@@ -4,16 +4,16 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
@@ -461,7 +461,7 @@ static int metapage_writepage(struct page *page, struct writeback_control *wbc) | |||
461 | goto add_failed; | 461 | goto add_failed; |
462 | if (!bio->bi_size) | 462 | if (!bio->bi_size) |
463 | goto dump_bio; | 463 | goto dump_bio; |
464 | 464 | ||
465 | submit_bio(WRITE, bio); | 465 | submit_bio(WRITE, bio); |
466 | } | 466 | } |
467 | if (redirty) | 467 | if (redirty) |
@@ -648,7 +648,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, | |||
648 | jfs_err("logical_size = %d, size = %d", | 648 | jfs_err("logical_size = %d, size = %d", |
649 | mp->logical_size, size); | 649 | mp->logical_size, size); |
650 | dump_stack(); | 650 | dump_stack(); |
651 | goto unlock; | 651 | goto unlock; |
652 | } | 652 | } |
653 | mp->count++; | 653 | mp->count++; |
654 | lock_metapage(mp); | 654 | lock_metapage(mp); |
@@ -658,7 +658,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, | |||
658 | "__get_metapage: using a " | 658 | "__get_metapage: using a " |
659 | "discarded metapage"); | 659 | "discarded metapage"); |
660 | discard_metapage(mp); | 660 | discard_metapage(mp); |
661 | goto unlock; | 661 | goto unlock; |
662 | } | 662 | } |
663 | clear_bit(META_discard, &mp->flag); | 663 | clear_bit(META_discard, &mp->flag); |
664 | } | 664 | } |
diff --git a/fs/jfs/jfs_metapage.h b/fs/jfs/jfs_metapage.h index 01a5a455e012..d94f8d9e87d7 100644 --- a/fs/jfs/jfs_metapage.h +++ b/fs/jfs/jfs_metapage.h | |||
@@ -4,16 +4,16 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | #ifndef _H_JFS_METAPAGE | 19 | #ifndef _H_JFS_METAPAGE |
@@ -33,7 +33,7 @@ struct metapage { | |||
33 | unsigned long flag; /* See Below */ | 33 | unsigned long flag; /* See Below */ |
34 | unsigned long count; /* Reference count */ | 34 | unsigned long count; /* Reference count */ |
35 | void *data; /* Data pointer */ | 35 | void *data; /* Data pointer */ |
36 | sector_t index; /* block address of page */ | 36 | sector_t index; /* block address of page */ |
37 | wait_queue_head_t wait; | 37 | wait_queue_head_t wait; |
38 | 38 | ||
39 | /* implementation */ | 39 | /* implementation */ |
diff --git a/fs/jfs/jfs_mount.c b/fs/jfs/jfs_mount.c index 032d111bc330..4dd479834897 100644 --- a/fs/jfs/jfs_mount.c +++ b/fs/jfs/jfs_mount.c | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
@@ -21,18 +21,18 @@ | |||
21 | * | 21 | * |
22 | * note: file system in transition to aggregate/fileset: | 22 | * note: file system in transition to aggregate/fileset: |
23 | * | 23 | * |
24 | * file system mount is interpreted as the mount of aggregate, | 24 | * file system mount is interpreted as the mount of aggregate, |
25 | * if not already mounted, and mount of the single/only fileset in | 25 | * if not already mounted, and mount of the single/only fileset in |
26 | * the aggregate; | 26 | * the aggregate; |
27 | * | 27 | * |
28 | * a file system/aggregate is represented by an internal inode | 28 | * a file system/aggregate is represented by an internal inode |
29 | * (aka mount inode) initialized with aggregate superblock; | 29 | * (aka mount inode) initialized with aggregate superblock; |
30 | * each vfs represents a fileset, and points to its "fileset inode | 30 | * each vfs represents a fileset, and points to its "fileset inode |
31 | * allocation map inode" (aka fileset inode): | 31 | * allocation map inode" (aka fileset inode): |
32 | * (an aggregate itself is structured recursively as a filset: | 32 | * (an aggregate itself is structured recursively as a filset: |
33 | * an internal vfs is constructed and points to its "fileset inode | 33 | * an internal vfs is constructed and points to its "fileset inode |
34 | * allocation map inode" (aka aggregate inode) where each inode | 34 | * allocation map inode" (aka aggregate inode) where each inode |
35 | * represents a fileset inode) so that inode number is mapped to | 35 | * represents a fileset inode) so that inode number is mapped to |
36 | * on-disk inode in uniform way at both aggregate and fileset level; | 36 | * on-disk inode in uniform way at both aggregate and fileset level; |
37 | * | 37 | * |
38 | * each vnode/inode of a fileset is linked to its vfs (to facilitate | 38 | * each vnode/inode of a fileset is linked to its vfs (to facilitate |
@@ -41,7 +41,7 @@ | |||
41 | * per aggregate information, e.g., block size, etc.) as well as | 41 | * per aggregate information, e.g., block size, etc.) as well as |
42 | * its file set inode. | 42 | * its file set inode. |
43 | * | 43 | * |
44 | * aggregate | 44 | * aggregate |
45 | * ipmnt | 45 | * ipmnt |
46 | * mntvfs -> fileset ipimap+ -> aggregate ipbmap -> aggregate ipaimap; | 46 | * mntvfs -> fileset ipimap+ -> aggregate ipbmap -> aggregate ipaimap; |
47 | * fileset vfs -> vp(1) <-> ... <-> vp(n) <->vproot; | 47 | * fileset vfs -> vp(1) <-> ... <-> vp(n) <->vproot; |
@@ -88,7 +88,7 @@ int jfs_mount(struct super_block *sb) | |||
88 | struct inode *ipbmap = NULL; | 88 | struct inode *ipbmap = NULL; |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * read/validate superblock | 91 | * read/validate superblock |
92 | * (initialize mount inode from the superblock) | 92 | * (initialize mount inode from the superblock) |
93 | */ | 93 | */ |
94 | if ((rc = chkSuper(sb))) { | 94 | if ((rc = chkSuper(sb))) { |
@@ -238,7 +238,7 @@ int jfs_mount(struct super_block *sb) | |||
238 | */ | 238 | */ |
239 | int jfs_mount_rw(struct super_block *sb, int remount) | 239 | int jfs_mount_rw(struct super_block *sb, int remount) |
240 | { | 240 | { |
241 | struct jfs_sb_info *sbi = JFS_SBI(sb); | 241 | struct jfs_sb_info *sbi = JFS_SBI(sb); |
242 | int rc; | 242 | int rc; |
243 | 243 | ||
244 | /* | 244 | /* |
@@ -291,7 +291,7 @@ int jfs_mount_rw(struct super_block *sb, int remount) | |||
291 | /* | 291 | /* |
292 | * chkSuper() | 292 | * chkSuper() |
293 | * | 293 | * |
294 | * validate the superblock of the file system to be mounted and | 294 | * validate the superblock of the file system to be mounted and |
295 | * get the file system parameters. | 295 | * get the file system parameters. |
296 | * | 296 | * |
297 | * returns | 297 | * returns |
@@ -426,7 +426,7 @@ int updateSuper(struct super_block *sb, uint state) | |||
426 | jfs_err("updateSuper: bad state"); | 426 | jfs_err("updateSuper: bad state"); |
427 | } else if (sbi->state == FM_DIRTY) | 427 | } else if (sbi->state == FM_DIRTY) |
428 | return 0; | 428 | return 0; |
429 | 429 | ||
430 | if ((rc = readSuper(sb, &bh))) | 430 | if ((rc = readSuper(sb, &bh))) |
431 | return rc; | 431 | return rc; |
432 | 432 | ||
@@ -486,9 +486,9 @@ int readSuper(struct super_block *sb, struct buffer_head **bpp) | |||
486 | * for this file system past this point in log. | 486 | * for this file system past this point in log. |
487 | * it is harmless if mount fails. | 487 | * it is harmless if mount fails. |
488 | * | 488 | * |
489 | * note: MOUNT record is at aggregate level, not at fileset level, | 489 | * note: MOUNT record is at aggregate level, not at fileset level, |
490 | * since log records of previous mounts of a fileset | 490 | * since log records of previous mounts of a fileset |
491 | * (e.g., AFTER record of extent allocation) have to be processed | 491 | * (e.g., AFTER record of extent allocation) have to be processed |
492 | * to update block allocation map at aggregate level. | 492 | * to update block allocation map at aggregate level. |
493 | */ | 493 | */ |
494 | static int logMOUNT(struct super_block *sb) | 494 | static int logMOUNT(struct super_block *sb) |
diff --git a/fs/jfs/jfs_superblock.h b/fs/jfs/jfs_superblock.h index 682cf1a68a18..884fc21ab8ee 100644 --- a/fs/jfs/jfs_superblock.h +++ b/fs/jfs/jfs_superblock.h | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_SUPERBLOCK | 18 | #ifndef _H_JFS_SUPERBLOCK |
@@ -21,14 +21,14 @@ | |||
21 | /* | 21 | /* |
22 | * make the magic number something a human could read | 22 | * make the magic number something a human could read |
23 | */ | 23 | */ |
24 | #define JFS_MAGIC "JFS1" /* Magic word */ | 24 | #define JFS_MAGIC "JFS1" /* Magic word */ |
25 | 25 | ||
26 | #define JFS_VERSION 2 /* Version number: Version 2 */ | 26 | #define JFS_VERSION 2 /* Version number: Version 2 */ |
27 | 27 | ||
28 | #define LV_NAME_SIZE 11 /* MUST BE 11 for OS/2 boot sector */ | 28 | #define LV_NAME_SIZE 11 /* MUST BE 11 for OS/2 boot sector */ |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * aggregate superblock | 31 | * aggregate superblock |
32 | * | 32 | * |
33 | * The name superblock is too close to super_block, so the name has been | 33 | * The name superblock is too close to super_block, so the name has been |
34 | * changed to jfs_superblock. The utilities are still using the old name. | 34 | * changed to jfs_superblock. The utilities are still using the old name. |
@@ -40,7 +40,7 @@ struct jfs_superblock { | |||
40 | __le64 s_size; /* 8: aggregate size in hardware/LVM blocks; | 40 | __le64 s_size; /* 8: aggregate size in hardware/LVM blocks; |
41 | * VFS: number of blocks | 41 | * VFS: number of blocks |
42 | */ | 42 | */ |
43 | __le32 s_bsize; /* 4: aggregate block size in bytes; | 43 | __le32 s_bsize; /* 4: aggregate block size in bytes; |
44 | * VFS: fragment size | 44 | * VFS: fragment size |
45 | */ | 45 | */ |
46 | __le16 s_l2bsize; /* 2: log2 of s_bsize */ | 46 | __le16 s_l2bsize; /* 2: log2 of s_bsize */ |
@@ -54,7 +54,7 @@ struct jfs_superblock { | |||
54 | __le32 s_flag; /* 4: aggregate attributes: | 54 | __le32 s_flag; /* 4: aggregate attributes: |
55 | * see jfs_filsys.h | 55 | * see jfs_filsys.h |
56 | */ | 56 | */ |
57 | __le32 s_state; /* 4: mount/unmount/recovery state: | 57 | __le32 s_state; /* 4: mount/unmount/recovery state: |
58 | * see jfs_filsys.h | 58 | * see jfs_filsys.h |
59 | */ | 59 | */ |
60 | __le32 s_compress; /* 4: > 0 if data compression */ | 60 | __le32 s_compress; /* 4: > 0 if data compression */ |
@@ -75,11 +75,11 @@ struct jfs_superblock { | |||
75 | struct timestruc_t s_time; /* 8: time last updated */ | 75 | struct timestruc_t s_time; /* 8: time last updated */ |
76 | 76 | ||
77 | __le32 s_fsckloglen; /* 4: Number of filesystem blocks reserved for | 77 | __le32 s_fsckloglen; /* 4: Number of filesystem blocks reserved for |
78 | * the fsck service log. | 78 | * the fsck service log. |
79 | * N.B. These blocks are divided among the | 79 | * N.B. These blocks are divided among the |
80 | * versions kept. This is not a per | 80 | * versions kept. This is not a per |
81 | * version size. | 81 | * version size. |
82 | * N.B. These blocks are included in the | 82 | * N.B. These blocks are included in the |
83 | * length field of s_fsckpxd. | 83 | * length field of s_fsckpxd. |
84 | */ | 84 | */ |
85 | s8 s_fscklog; /* 1: which fsck service log is most recent | 85 | s8 s_fscklog; /* 1: which fsck service log is most recent |
@@ -87,7 +87,7 @@ struct jfs_superblock { | |||
87 | * 1 => the first one | 87 | * 1 => the first one |
88 | * 2 => the 2nd one | 88 | * 2 => the 2nd one |
89 | */ | 89 | */ |
90 | char s_fpack[11]; /* 11: file system volume name | 90 | char s_fpack[11]; /* 11: file system volume name |
91 | * N.B. This must be 11 bytes to | 91 | * N.B. This must be 11 bytes to |
92 | * conform with the OS/2 BootSector | 92 | * conform with the OS/2 BootSector |
93 | * requirements | 93 | * requirements |
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index 6ea9c1a88f78..81f6f04af192 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c | |||
@@ -4,16 +4,16 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
diff --git a/fs/jfs/jfs_txnmgr.h b/fs/jfs/jfs_txnmgr.h index 0e4dc4514c47..7863cf21afca 100644 --- a/fs/jfs/jfs_txnmgr.h +++ b/fs/jfs/jfs_txnmgr.h | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_TXNMGR | 18 | #ifndef _H_JFS_TXNMGR |
@@ -179,7 +179,7 @@ struct linelock { | |||
179 | /* (8) */ | 179 | /* (8) */ |
180 | 180 | ||
181 | struct lv lv[20]; /* 40: */ | 181 | struct lv lv[20]; /* 40: */ |
182 | }; /* (48) */ | 182 | }; /* (48) */ |
183 | 183 | ||
184 | #define dt_lock linelock | 184 | #define dt_lock linelock |
185 | 185 | ||
@@ -211,8 +211,8 @@ struct xtlock { | |||
211 | * at tlock.lock/linelock: watch for alignment; | 211 | * at tlock.lock/linelock: watch for alignment; |
212 | * N.B. next field may be set by linelock, and should not | 212 | * N.B. next field may be set by linelock, and should not |
213 | * be modified by maplock; | 213 | * be modified by maplock; |
214 | * N.B. index of the first pxdlock specifies index of next | 214 | * N.B. index of the first pxdlock specifies index of next |
215 | * free maplock (i.e., number of maplock) in the tlock; | 215 | * free maplock (i.e., number of maplock) in the tlock; |
216 | */ | 216 | */ |
217 | struct maplock { | 217 | struct maplock { |
218 | lid_t next; /* 2: */ | 218 | lid_t next; /* 2: */ |
diff --git a/fs/jfs/jfs_umount.c b/fs/jfs/jfs_umount.c index 21eaf7ac0fcb..a386f48c73fc 100644 --- a/fs/jfs/jfs_umount.c +++ b/fs/jfs/jfs_umount.c | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
@@ -22,8 +22,8 @@ | |||
22 | * note: file system in transition to aggregate/fileset: | 22 | * note: file system in transition to aggregate/fileset: |
23 | * (ref. jfs_mount.c) | 23 | * (ref. jfs_mount.c) |
24 | * | 24 | * |
25 | * file system unmount is interpreted as mount of the single/only | 25 | * file system unmount is interpreted as mount of the single/only |
26 | * fileset in the aggregate and, if unmount of the last fileset, | 26 | * fileset in the aggregate and, if unmount of the last fileset, |
27 | * as unmount of the aggerate; | 27 | * as unmount of the aggerate; |
28 | */ | 28 | */ |
29 | 29 | ||
@@ -60,13 +60,13 @@ int jfs_umount(struct super_block *sb) | |||
60 | jfs_info("UnMount JFS: sb:0x%p", sb); | 60 | jfs_info("UnMount JFS: sb:0x%p", sb); |
61 | 61 | ||
62 | /* | 62 | /* |
63 | * update superblock and close log | 63 | * update superblock and close log |
64 | * | 64 | * |
65 | * if mounted read-write and log based recovery was enabled | 65 | * if mounted read-write and log based recovery was enabled |
66 | */ | 66 | */ |
67 | if ((log = sbi->log)) | 67 | if ((log = sbi->log)) |
68 | /* | 68 | /* |
69 | * Wait for outstanding transactions to be written to log: | 69 | * Wait for outstanding transactions to be written to log: |
70 | */ | 70 | */ |
71 | jfs_flush_journal(log, 2); | 71 | jfs_flush_journal(log, 2); |
72 | 72 | ||
@@ -112,17 +112,17 @@ int jfs_umount(struct super_block *sb) | |||
112 | 112 | ||
113 | /* | 113 | /* |
114 | * ensure all file system file pages are propagated to their | 114 | * ensure all file system file pages are propagated to their |
115 | * home blocks on disk (and their in-memory buffer pages are | 115 | * home blocks on disk (and their in-memory buffer pages are |
116 | * invalidated) BEFORE updating file system superblock state | 116 | * invalidated) BEFORE updating file system superblock state |
117 | * (to signify file system is unmounted cleanly, and thus in | 117 | * (to signify file system is unmounted cleanly, and thus in |
118 | * consistent state) and log superblock active file system | 118 | * consistent state) and log superblock active file system |
119 | * list (to signify skip logredo()). | 119 | * list (to signify skip logredo()). |
120 | */ | 120 | */ |
121 | if (log) { /* log = NULL if read-only mount */ | 121 | if (log) { /* log = NULL if read-only mount */ |
122 | updateSuper(sb, FM_CLEAN); | 122 | updateSuper(sb, FM_CLEAN); |
123 | 123 | ||
124 | /* | 124 | /* |
125 | * close log: | 125 | * close log: |
126 | * | 126 | * |
127 | * remove file system from log active file system list. | 127 | * remove file system from log active file system list. |
128 | */ | 128 | */ |
@@ -142,7 +142,7 @@ int jfs_umount_rw(struct super_block *sb) | |||
142 | return 0; | 142 | return 0; |
143 | 143 | ||
144 | /* | 144 | /* |
145 | * close log: | 145 | * close log: |
146 | * | 146 | * |
147 | * remove file system from log active file system list. | 147 | * remove file system from log active file system list. |
148 | */ | 148 | */ |
diff --git a/fs/jfs/jfs_unicode.c b/fs/jfs/jfs_unicode.c index 0543f7fd4364..c7de6f5bbefc 100644 --- a/fs/jfs/jfs_unicode.c +++ b/fs/jfs/jfs_unicode.c | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
@@ -57,8 +57,8 @@ int jfs_strfromUCS_le(char *to, const __le16 * from, | |||
57 | warn--; | 57 | warn--; |
58 | warn_again--; | 58 | warn_again--; |
59 | printk(KERN_ERR | 59 | printk(KERN_ERR |
60 | "non-latin1 character 0x%x found in JFS file name\n", | 60 | "non-latin1 character 0x%x found in JFS file name\n", |
61 | le16_to_cpu(from[i])); | 61 | le16_to_cpu(from[i])); |
62 | printk(KERN_ERR | 62 | printk(KERN_ERR |
63 | "mount with iocharset=utf8 to access\n"); | 63 | "mount with iocharset=utf8 to access\n"); |
64 | } | 64 | } |
diff --git a/fs/jfs/jfs_unicode.h b/fs/jfs/jfs_unicode.h index 69e25ebe87ac..3fbb3a225590 100644 --- a/fs/jfs/jfs_unicode.h +++ b/fs/jfs/jfs_unicode.h | |||
@@ -1,19 +1,19 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2000-2002 | 2 | * Copyright (C) International Business Machines Corp., 2000-2002 |
3 | * Portions Copyright (c) Christoph Hellwig, 2001-2002 | 3 | * Portions Copyright (C) Christoph Hellwig, 2001-2002 |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | #ifndef _H_JFS_UNICODE | 19 | #ifndef _H_JFS_UNICODE |
diff --git a/fs/jfs/jfs_uniupr.c b/fs/jfs/jfs_uniupr.c index 4ab185d26308..cfe50666d312 100644 --- a/fs/jfs/jfs_uniupr.c +++ b/fs/jfs/jfs_uniupr.c | |||
@@ -1,18 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2000-2002 | 2 | * Copyright (C) International Business Machines Corp., 2000-2002 |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
diff --git a/fs/jfs/jfs_xattr.h b/fs/jfs/jfs_xattr.h index 25e9990bccd1..88b6cc535bf2 100644 --- a/fs/jfs/jfs_xattr.h +++ b/fs/jfs/jfs_xattr.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2000-2002 | 2 | * Copyright (C) International Business Machines Corp., 2000-2002 |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
diff --git a/fs/jfs/jfs_xtree.c b/fs/jfs/jfs_xtree.c index c92307d3a57e..e98eb03e5310 100644 --- a/fs/jfs/jfs_xtree.c +++ b/fs/jfs/jfs_xtree.c | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | /* | 18 | /* |
@@ -2428,7 +2428,7 @@ printf("xtUpdate.updateLeft.split p:0x%p\n", p); | |||
2428 | * return: | 2428 | * return: |
2429 | */ | 2429 | */ |
2430 | int xtAppend(tid_t tid, /* transaction id */ | 2430 | int xtAppend(tid_t tid, /* transaction id */ |
2431 | struct inode *ip, int xflag, s64 xoff, s32 maxblocks, | 2431 | struct inode *ip, int xflag, s64 xoff, s32 maxblocks, |
2432 | s32 * xlenp, /* (in/out) */ | 2432 | s32 * xlenp, /* (in/out) */ |
2433 | s64 * xaddrp, /* (in/out) */ | 2433 | s64 * xaddrp, /* (in/out) */ |
2434 | int flag) | 2434 | int flag) |
@@ -2499,7 +2499,7 @@ int xtAppend(tid_t tid, /* transaction id */ | |||
2499 | pxdlist.maxnpxd = pxdlist.npxd = 0; | 2499 | pxdlist.maxnpxd = pxdlist.npxd = 0; |
2500 | pxd = &pxdlist.pxd[0]; | 2500 | pxd = &pxdlist.pxd[0]; |
2501 | nblocks = JFS_SBI(ip->i_sb)->nbperpage; | 2501 | nblocks = JFS_SBI(ip->i_sb)->nbperpage; |
2502 | for (; nsplit > 0; nsplit--, pxd++, xaddr += nblocks, maxblocks -= nblocks) { | 2502 | for (; nsplit > 0; nsplit--, pxd++, xaddr += nblocks, maxblocks -= nblocks) { |
2503 | if ((rc = dbAllocBottomUp(ip, xaddr, (s64) nblocks)) == 0) { | 2503 | if ((rc = dbAllocBottomUp(ip, xaddr, (s64) nblocks)) == 0) { |
2504 | PXDaddress(pxd, xaddr); | 2504 | PXDaddress(pxd, xaddr); |
2505 | PXDlength(pxd, nblocks); | 2505 | PXDlength(pxd, nblocks); |
@@ -2514,7 +2514,7 @@ int xtAppend(tid_t tid, /* transaction id */ | |||
2514 | goto out; | 2514 | goto out; |
2515 | } | 2515 | } |
2516 | 2516 | ||
2517 | xlen = min(xlen, maxblocks); | 2517 | xlen = min(xlen, maxblocks); |
2518 | 2518 | ||
2519 | /* | 2519 | /* |
2520 | * allocate data extent requested | 2520 | * allocate data extent requested |
diff --git a/fs/jfs/jfs_xtree.h b/fs/jfs/jfs_xtree.h index af668a80b40f..164f6f2b1019 100644 --- a/fs/jfs/jfs_xtree.h +++ b/fs/jfs/jfs_xtree.h | |||
@@ -1,18 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) International Business Machines Corp., 2000-2002 | 2 | * Copyright (C) International Business Machines Corp., 2000-2002 |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _H_JFS_XTREE | 18 | #ifndef _H_JFS_XTREE |
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index 5d4ef6e4b7e9..a6a8c16c872c 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c | |||
@@ -4,16 +4,16 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
@@ -41,7 +41,7 @@ static s64 commitZeroLink(tid_t, struct inode *); | |||
41 | /* | 41 | /* |
42 | * NAME: free_ea_wmap(inode) | 42 | * NAME: free_ea_wmap(inode) |
43 | * | 43 | * |
44 | * FUNCTION: free uncommitted extended attributes from working map | 44 | * FUNCTION: free uncommitted extended attributes from working map |
45 | * | 45 | * |
46 | */ | 46 | */ |
47 | static inline void free_ea_wmap(struct inode *inode) | 47 | static inline void free_ea_wmap(struct inode *inode) |
@@ -62,7 +62,7 @@ static inline void free_ea_wmap(struct inode *inode) | |||
62 | * FUNCTION: create a regular file in the parent directory <dip> | 62 | * FUNCTION: create a regular file in the parent directory <dip> |
63 | * with name = <from dentry> and mode = <mode> | 63 | * with name = <from dentry> and mode = <mode> |
64 | * | 64 | * |
65 | * PARAMETER: dip - parent directory vnode | 65 | * PARAMETER: dip - parent directory vnode |
66 | * dentry - dentry of new file | 66 | * dentry - dentry of new file |
67 | * mode - create mode (rwxrwxrwx). | 67 | * mode - create mode (rwxrwxrwx). |
68 | * nd- nd struct | 68 | * nd- nd struct |
@@ -190,7 +190,7 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, int mode, | |||
190 | * FUNCTION: create a child directory in the parent directory <dip> | 190 | * FUNCTION: create a child directory in the parent directory <dip> |
191 | * with name = <from dentry> and mode = <mode> | 191 | * with name = <from dentry> and mode = <mode> |
192 | * | 192 | * |
193 | * PARAMETER: dip - parent directory vnode | 193 | * PARAMETER: dip - parent directory vnode |
194 | * dentry - dentry of child directory | 194 | * dentry - dentry of child directory |
195 | * mode - create mode (rwxrwxrwx). | 195 | * mode - create mode (rwxrwxrwx). |
196 | * | 196 | * |
@@ -324,7 +324,7 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) | |||
324 | * | 324 | * |
325 | * FUNCTION: remove a link to child directory | 325 | * FUNCTION: remove a link to child directory |
326 | * | 326 | * |
327 | * PARAMETER: dip - parent inode | 327 | * PARAMETER: dip - parent inode |
328 | * dentry - child directory dentry | 328 | * dentry - child directory dentry |
329 | * | 329 | * |
330 | * RETURN: -EINVAL - if name is . or .. | 330 | * RETURN: -EINVAL - if name is . or .. |
@@ -332,10 +332,10 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) | |||
332 | * errors from subroutines | 332 | * errors from subroutines |
333 | * | 333 | * |
334 | * note: | 334 | * note: |
335 | * if other threads have the directory open when the last link | 335 | * if other threads have the directory open when the last link |
336 | * is removed, the "." and ".." entries, if present, are removed before | 336 | * is removed, the "." and ".." entries, if present, are removed before |
337 | * rmdir() returns and no new entries may be created in the directory, | 337 | * rmdir() returns and no new entries may be created in the directory, |
338 | * but the directory is not removed until the last reference to | 338 | * but the directory is not removed until the last reference to |
339 | * the directory is released (cf.unlink() of regular file). | 339 | * the directory is released (cf.unlink() of regular file). |
340 | */ | 340 | */ |
341 | static int jfs_rmdir(struct inode *dip, struct dentry *dentry) | 341 | static int jfs_rmdir(struct inode *dip, struct dentry *dentry) |
@@ -446,11 +446,11 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry) | |||
446 | /* | 446 | /* |
447 | * NAME: jfs_unlink(dip, dentry) | 447 | * NAME: jfs_unlink(dip, dentry) |
448 | * | 448 | * |
449 | * FUNCTION: remove a link to object <vp> named by <name> | 449 | * FUNCTION: remove a link to object <vp> named by <name> |
450 | * from parent directory <dvp> | 450 | * from parent directory <dvp> |
451 | * | 451 | * |
452 | * PARAMETER: dip - inode of parent directory | 452 | * PARAMETER: dip - inode of parent directory |
453 | * dentry - dentry of object to be removed | 453 | * dentry - dentry of object to be removed |
454 | * | 454 | * |
455 | * RETURN: errors from subroutines | 455 | * RETURN: errors from subroutines |
456 | * | 456 | * |
@@ -598,7 +598,7 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry) | |||
598 | * | 598 | * |
599 | * FUNCTION: for non-directory, called by jfs_remove(), | 599 | * FUNCTION: for non-directory, called by jfs_remove(), |
600 | * truncate a regular file, directory or symbolic | 600 | * truncate a regular file, directory or symbolic |
601 | * link to zero length. return 0 if type is not | 601 | * link to zero length. return 0 if type is not |
602 | * one of these. | 602 | * one of these. |
603 | * | 603 | * |
604 | * if the file is currently associated with a VM segment | 604 | * if the file is currently associated with a VM segment |
@@ -608,7 +608,7 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry) | |||
608 | * map by ctrunc1. | 608 | * map by ctrunc1. |
609 | * if there is no VM segment on entry, the resources are | 609 | * if there is no VM segment on entry, the resources are |
610 | * freed in both work and permanent map. | 610 | * freed in both work and permanent map. |
611 | * (? for temporary file - memory object is cached even | 611 | * (? for temporary file - memory object is cached even |
612 | * after no reference: | 612 | * after no reference: |
613 | * reference count > 0 - ) | 613 | * reference count > 0 - ) |
614 | * | 614 | * |
@@ -662,7 +662,7 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip) | |||
662 | 662 | ||
663 | /* | 663 | /* |
664 | * free xtree/data (truncate to zero length): | 664 | * free xtree/data (truncate to zero length): |
665 | * free xtree/data pages from cache if COMMIT_PWMAP, | 665 | * free xtree/data pages from cache if COMMIT_PWMAP, |
666 | * free xtree/data blocks from persistent block map, and | 666 | * free xtree/data blocks from persistent block map, and |
667 | * free xtree/data blocks from working block map if COMMIT_PWMAP; | 667 | * free xtree/data blocks from working block map if COMMIT_PWMAP; |
668 | */ | 668 | */ |
@@ -677,7 +677,7 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip) | |||
677 | * NAME: jfs_free_zero_link() | 677 | * NAME: jfs_free_zero_link() |
678 | * | 678 | * |
679 | * FUNCTION: for non-directory, called by iClose(), | 679 | * FUNCTION: for non-directory, called by iClose(), |
680 | * free resources of a file from cache and WORKING map | 680 | * free resources of a file from cache and WORKING map |
681 | * for a file previously committed with zero link count | 681 | * for a file previously committed with zero link count |
682 | * while associated with a pager object, | 682 | * while associated with a pager object, |
683 | * | 683 | * |
@@ -762,7 +762,7 @@ void jfs_free_zero_link(struct inode *ip) | |||
762 | * FUNCTION: create a link to <vp> by the name = <name> | 762 | * FUNCTION: create a link to <vp> by the name = <name> |
763 | * in the parent directory <dvp> | 763 | * in the parent directory <dvp> |
764 | * | 764 | * |
765 | * PARAMETER: vp - target object | 765 | * PARAMETER: vp - target object |
766 | * dvp - parent directory of new link | 766 | * dvp - parent directory of new link |
767 | * name - name of new link to target object | 767 | * name - name of new link to target object |
768 | * crp - credential | 768 | * crp - credential |
@@ -858,8 +858,8 @@ static int jfs_link(struct dentry *old_dentry, | |||
858 | * in directory <dip> | 858 | * in directory <dip> |
859 | * | 859 | * |
860 | * PARAMETER: dip - parent directory vnode | 860 | * PARAMETER: dip - parent directory vnode |
861 | * dentry - dentry of symbolic link | 861 | * dentry - dentry of symbolic link |
862 | * name - the path name of the existing object | 862 | * name - the path name of the existing object |
863 | * that will be the source of the link | 863 | * that will be the source of the link |
864 | * | 864 | * |
865 | * RETURN: errors from subroutines | 865 | * RETURN: errors from subroutines |
@@ -926,7 +926,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, | |||
926 | tblk->u.ixpxd = JFS_IP(ip)->ixpxd; | 926 | tblk->u.ixpxd = JFS_IP(ip)->ixpxd; |
927 | 927 | ||
928 | /* fix symlink access permission | 928 | /* fix symlink access permission |
929 | * (dir_create() ANDs in the u.u_cmask, | 929 | * (dir_create() ANDs in the u.u_cmask, |
930 | * but symlinks really need to be 777 access) | 930 | * but symlinks really need to be 777 access) |
931 | */ | 931 | */ |
932 | ip->i_mode |= 0777; | 932 | ip->i_mode |= 0777; |
@@ -967,7 +967,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, | |||
967 | ip->i_mapping->a_ops = &jfs_aops; | 967 | ip->i_mapping->a_ops = &jfs_aops; |
968 | 968 | ||
969 | /* | 969 | /* |
970 | * even though the data of symlink object (source | 970 | * even though the data of symlink object (source |
971 | * path name) is treated as non-journaled user data, | 971 | * path name) is treated as non-journaled user data, |
972 | * it is read/written thru buffer cache for performance. | 972 | * it is read/written thru buffer cache for performance. |
973 | */ | 973 | */ |
@@ -1175,7 +1175,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1175 | /* free block resources */ | 1175 | /* free block resources */ |
1176 | if ((new_size = commitZeroLink(tid, new_ip)) < 0) { | 1176 | if ((new_size = commitZeroLink(tid, new_ip)) < 0) { |
1177 | txAbort(tid, 1); /* Marks FS Dirty */ | 1177 | txAbort(tid, 1); /* Marks FS Dirty */ |
1178 | rc = new_size; | 1178 | rc = new_size; |
1179 | goto out4; | 1179 | goto out4; |
1180 | } | 1180 | } |
1181 | tblk = tid_to_tblock(tid); | 1181 | tblk = tid_to_tblock(tid); |
@@ -1291,7 +1291,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1291 | new_size = xtTruncate_pmap(tid, new_ip, new_size); | 1291 | new_size = xtTruncate_pmap(tid, new_ip, new_size); |
1292 | if (new_size < 0) { | 1292 | if (new_size < 0) { |
1293 | txAbort(tid, 1); | 1293 | txAbort(tid, 1); |
1294 | rc = new_size; | 1294 | rc = new_size; |
1295 | } else | 1295 | } else |
1296 | rc = txCommit(tid, 1, &new_ip, COMMIT_SYNC); | 1296 | rc = txCommit(tid, 1, &new_ip, COMMIT_SYNC); |
1297 | txEnd(tid); | 1297 | txEnd(tid); |
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c index 45180361871c..79d625f3f733 100644 --- a/fs/jfs/resize.c +++ b/fs/jfs/resize.c | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index fc6951587c6b..9c1c6e0e633d 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -4,16 +4,16 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
@@ -82,7 +82,7 @@ static void jfs_handle_error(struct super_block *sb) | |||
82 | "as read-only\n", | 82 | "as read-only\n", |
83 | sb->s_id); | 83 | sb->s_id); |
84 | sb->s_flags |= MS_RDONLY; | 84 | sb->s_flags |= MS_RDONLY; |
85 | } | 85 | } |
86 | 86 | ||
87 | /* nothing is done for continue beyond marking the superblock dirty */ | 87 | /* nothing is done for continue beyond marking the superblock dirty */ |
88 | } | 88 | } |
@@ -775,7 +775,7 @@ static int __init init_jfs_fs(void) | |||
775 | int rc; | 775 | int rc; |
776 | 776 | ||
777 | jfs_inode_cachep = | 777 | jfs_inode_cachep = |
778 | kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0, | 778 | kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0, |
779 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, | 779 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, |
780 | init_once, NULL); | 780 | init_once, NULL); |
781 | if (jfs_inode_cachep == NULL) | 781 | if (jfs_inode_cachep == NULL) |
diff --git a/fs/jfs/symlink.c b/fs/jfs/symlink.c index 16477b3835e1..cee43f36f51d 100644 --- a/fs/jfs/symlink.c +++ b/fs/jfs/symlink.c | |||
@@ -3,16 +3,16 @@ | |||
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
12 | * the GNU General Public License for more details. | 12 | * the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index 7a10e1928961..4c7985ebca92 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c | |||
@@ -4,16 +4,16 @@ | |||
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
13 | * the GNU General Public License for more details. | 13 | * the GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
@@ -57,7 +57,7 @@ | |||
57 | * | 57 | * |
58 | * 0 4 4 + EA_SIZE(ea1) | 58 | * 0 4 4 + EA_SIZE(ea1) |
59 | * +------------+-------------------+--------------------+----- | 59 | * +------------+-------------------+--------------------+----- |
60 | * | Overall EA | First FEA Element | Second FEA Element | ..... | 60 | * | Overall EA | First FEA Element | Second FEA Element | ..... |
61 | * | List Size | | | | 61 | * | List Size | | | |
62 | * +------------+-------------------+--------------------+----- | 62 | * +------------+-------------------+--------------------+----- |
63 | * | 63 | * |
@@ -155,9 +155,9 @@ static void ea_release(struct inode *inode, struct ea_buffer *ea_buf); | |||
155 | 155 | ||
156 | /* | 156 | /* |
157 | * NAME: ea_write_inline | 157 | * NAME: ea_write_inline |
158 | * | 158 | * |
159 | * FUNCTION: Attempt to write an EA inline if area is available | 159 | * FUNCTION: Attempt to write an EA inline if area is available |
160 | * | 160 | * |
161 | * PRE CONDITIONS: | 161 | * PRE CONDITIONS: |
162 | * Already verified that the specified EA is small enough to fit inline | 162 | * Already verified that the specified EA is small enough to fit inline |
163 | * | 163 | * |
@@ -216,10 +216,10 @@ static int ea_write_inline(struct inode *ip, struct jfs_ea_list *ealist, | |||
216 | 216 | ||
217 | /* | 217 | /* |
218 | * NAME: ea_write | 218 | * NAME: ea_write |
219 | * | 219 | * |
220 | * FUNCTION: Write an EA for an inode | 220 | * FUNCTION: Write an EA for an inode |
221 | * | 221 | * |
222 | * PRE CONDITIONS: EA has been verified | 222 | * PRE CONDITIONS: EA has been verified |
223 | * | 223 | * |
224 | * PARAMETERS: | 224 | * PARAMETERS: |
225 | * ip - Inode pointer | 225 | * ip - Inode pointer |
@@ -340,9 +340,9 @@ static int ea_write(struct inode *ip, struct jfs_ea_list *ealist, int size, | |||
340 | 340 | ||
341 | /* | 341 | /* |
342 | * NAME: ea_read_inline | 342 | * NAME: ea_read_inline |
343 | * | 343 | * |
344 | * FUNCTION: Read an inlined EA into user's buffer | 344 | * FUNCTION: Read an inlined EA into user's buffer |
345 | * | 345 | * |
346 | * PARAMETERS: | 346 | * PARAMETERS: |
347 | * ip - Inode pointer | 347 | * ip - Inode pointer |
348 | * ealist - Pointer to buffer to fill in with EA | 348 | * ealist - Pointer to buffer to fill in with EA |
@@ -372,9 +372,9 @@ static int ea_read_inline(struct inode *ip, struct jfs_ea_list *ealist) | |||
372 | 372 | ||
373 | /* | 373 | /* |
374 | * NAME: ea_read | 374 | * NAME: ea_read |
375 | * | 375 | * |
376 | * FUNCTION: copy EA data into user's buffer | 376 | * FUNCTION: copy EA data into user's buffer |
377 | * | 377 | * |
378 | * PARAMETERS: | 378 | * PARAMETERS: |
379 | * ip - Inode pointer | 379 | * ip - Inode pointer |
380 | * ealist - Pointer to buffer to fill in with EA | 380 | * ealist - Pointer to buffer to fill in with EA |
@@ -406,7 +406,7 @@ static int ea_read(struct inode *ip, struct jfs_ea_list *ealist) | |||
406 | return -EIO; | 406 | return -EIO; |
407 | } | 407 | } |
408 | 408 | ||
409 | /* | 409 | /* |
410 | * Figure out how many blocks were allocated when this EA list was | 410 | * Figure out how many blocks were allocated when this EA list was |
411 | * originally written to disk. | 411 | * originally written to disk. |
412 | */ | 412 | */ |
@@ -443,14 +443,14 @@ static int ea_read(struct inode *ip, struct jfs_ea_list *ealist) | |||
443 | 443 | ||
444 | /* | 444 | /* |
445 | * NAME: ea_get | 445 | * NAME: ea_get |
446 | * | 446 | * |
447 | * FUNCTION: Returns buffer containing existing extended attributes. | 447 | * FUNCTION: Returns buffer containing existing extended attributes. |
448 | * The size of the buffer will be the larger of the existing | 448 | * The size of the buffer will be the larger of the existing |
449 | * attributes size, or min_size. | 449 | * attributes size, or min_size. |
450 | * | 450 | * |
451 | * The buffer, which may be inlined in the inode or in the | 451 | * The buffer, which may be inlined in the inode or in the |
452 | * page cache must be release by calling ea_release or ea_put | 452 | * page cache must be release by calling ea_release or ea_put |
453 | * | 453 | * |
454 | * PARAMETERS: | 454 | * PARAMETERS: |
455 | * inode - Inode pointer | 455 | * inode - Inode pointer |
456 | * ea_buf - Structure to be populated with ealist and its metadata | 456 | * ea_buf - Structure to be populated with ealist and its metadata |
@@ -1054,7 +1054,7 @@ ssize_t jfs_listxattr(struct dentry * dentry, char *data, size_t buf_size) | |||
1054 | 1054 | ||
1055 | /* compute required size of list */ | 1055 | /* compute required size of list */ |
1056 | for (ea = FIRST_EA(ealist); ea < END_EALIST(ealist); ea = NEXT_EA(ea)) { | 1056 | for (ea = FIRST_EA(ealist); ea < END_EALIST(ealist); ea = NEXT_EA(ea)) { |
1057 | if (can_list(ea)) | 1057 | if (can_list(ea)) |
1058 | size += name_size(ea) + 1; | 1058 | size += name_size(ea) + 1; |
1059 | } | 1059 | } |
1060 | 1060 | ||
@@ -1069,7 +1069,7 @@ ssize_t jfs_listxattr(struct dentry * dentry, char *data, size_t buf_size) | |||
1069 | /* Copy attribute names to buffer */ | 1069 | /* Copy attribute names to buffer */ |
1070 | buffer = data; | 1070 | buffer = data; |
1071 | for (ea = FIRST_EA(ealist); ea < END_EALIST(ealist); ea = NEXT_EA(ea)) { | 1071 | for (ea = FIRST_EA(ealist); ea < END_EALIST(ealist); ea = NEXT_EA(ea)) { |
1072 | if (can_list(ea)) { | 1072 | if (can_list(ea)) { |
1073 | int namelen = copy_name(buffer, ea); | 1073 | int namelen = copy_name(buffer, ea); |
1074 | buffer += namelen + 1; | 1074 | buffer += namelen + 1; |
1075 | } | 1075 | } |