提交 44f54921 编写于 作者: L Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
  JFS: White space cleanup
  [PATCH] JFS: return correct error when i-node allocation failed
  JFS: Remove shadow variable from fs/jfs/jfs_txnmgr.c:xtLog()
...@@ -5,16 +5,16 @@ ...@@ -5,16 +5,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -183,7 +183,7 @@ int jfs_init_acl(tid_t tid, struct inode *inode, struct inode *dir) ...@@ -183,7 +183,7 @@ int jfs_init_acl(tid_t tid, struct inode *inode, struct inode *dir)
posix_acl_release(acl); posix_acl_release(acl);
} else } else
inode->i_mode &= ~current->fs->umask; inode->i_mode &= ~current->fs->umask;
JFS_IP(inode)->mode2 = (JFS_IP(inode)->mode2 & 0xffff0000) | JFS_IP(inode)->mode2 = (JFS_IP(inode)->mode2 & 0xffff0000) |
inode->i_mode; inode->i_mode;
......
/* /*
* Copyright (c) International Business Machines Corp., 2001 * Copyright (C) International Business Machines Corp., 2001
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -108,7 +108,7 @@ const struct file_operations jfs_file_operations = { ...@@ -108,7 +108,7 @@ const struct file_operations jfs_file_operations = {
.aio_read = generic_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = generic_file_aio_write, .aio_write = generic_file_aio_write,
.mmap = generic_file_mmap, .mmap = generic_file_mmap,
.sendfile = generic_file_sendfile, .sendfile = generic_file_sendfile,
.fsync = jfs_fsync, .fsync = jfs_fsync,
.release = jfs_release, .release = jfs_release,
.ioctl = jfs_ioctl, .ioctl = jfs_ioctl,
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
void jfs_read_inode(struct inode *inode) void jfs_read_inode(struct inode *inode)
{ {
if (diRead(inode)) { if (diRead(inode)) {
make_bad_inode(inode); make_bad_inode(inode);
return; return;
} }
......
/* /*
* Copyright (c) International Business Machines Corp., 2002 * Copyright (C) International Business Machines Corp., 2002
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_ACL #ifndef _H_JFS_ACL
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_BTREE #ifndef _H_JFS_BTREE
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
......
/* /*
* Copyright (c) International Business Machines Corp., 2000-2001 * Copyright (C) International Business Machines Corp., 2000-2001
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_DINODE #ifndef _H_JFS_DINODE
......
此差异已折叠。
/* /*
* Copyright (c) International Business Machines Corp., 2000-2002 * Copyright (C) International Business Machines Corp., 2000-2002
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_DMAP #ifndef _H_JFS_DMAP
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define L2LPERDMAP 8 /* l2 number of leaves per dmap tree */ #define L2LPERDMAP 8 /* l2 number of leaves per dmap tree */
#define DBWORD 32 /* # of blks covered by a map word */ #define DBWORD 32 /* # of blks covered by a map word */
#define L2DBWORD 5 /* l2 # of blks covered by a mword */ #define L2DBWORD 5 /* l2 # of blks covered by a mword */
#define BUDMIN L2DBWORD /* max free string in a map word */ #define BUDMIN L2DBWORD /* max free string in a map word */
#define BPERDMAP (LPERDMAP * DBWORD) /* num of blks per dmap */ #define BPERDMAP (LPERDMAP * DBWORD) /* num of blks per dmap */
#define L2BPERDMAP 13 /* l2 num of blks per dmap */ #define L2BPERDMAP 13 /* l2 num of blks per dmap */
#define CTLTREESIZE (1024+256+64+16+4+1) /* size of a dmapctl tree */ #define CTLTREESIZE (1024+256+64+16+4+1) /* size of a dmapctl tree */
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#define MAXMAPSIZE MAXL2SIZE /* maximum aggregate map size */ #define MAXMAPSIZE MAXL2SIZE /* maximum aggregate map size */
/* /*
* determine the maximum free string for four (lower level) nodes * determine the maximum free string for four (lower level) nodes
* of the tree. * of the tree.
*/ */
...@@ -122,7 +122,7 @@ static __inline signed char TREEMAX(signed char *cp) ...@@ -122,7 +122,7 @@ static __inline signed char TREEMAX(signed char *cp)
#define BLKTOCTL(b,s,l) \ #define BLKTOCTL(b,s,l) \
(((l) == 2) ? 1 : ((l) == 1) ? BLKTOL1((b),(s)) : BLKTOL0((b),(s))) (((l) == 2) ? 1 : ((l) == 1) ? BLKTOL1((b),(s)) : BLKTOL0((b),(s)))
/* /*
* convert aggregate map size to the zero origin dmapctl level of the * convert aggregate map size to the zero origin dmapctl level of the
* top dmapctl. * top dmapctl.
*/ */
...@@ -192,13 +192,13 @@ typedef union dmtree { ...@@ -192,13 +192,13 @@ typedef union dmtree {
/* macros for accessing fields within dmtree */ /* macros for accessing fields within dmtree */
#define dmt_nleafs t1.nleafs #define dmt_nleafs t1.nleafs
#define dmt_l2nleafs t1.l2nleafs #define dmt_l2nleafs t1.l2nleafs
#define dmt_leafidx t1.leafidx #define dmt_leafidx t1.leafidx
#define dmt_height t1.height #define dmt_height t1.height
#define dmt_budmin t1.budmin #define dmt_budmin t1.budmin
#define dmt_stree t1.stree #define dmt_stree t1.stree
/* /*
* on-disk aggregate disk allocation map descriptor. * on-disk aggregate disk allocation map descriptor.
*/ */
struct dbmap_disk { struct dbmap_disk {
...@@ -237,7 +237,7 @@ struct dbmap { ...@@ -237,7 +237,7 @@ struct dbmap {
s64 dn_agsize; /* num of blks per alloc group */ s64 dn_agsize; /* num of blks per alloc group */
signed char dn_maxfreebud; /* max free buddy system */ signed char dn_maxfreebud; /* max free buddy system */
}; /* - 4096 - */ }; /* - 4096 - */
/* /*
* in-memory aggregate disk allocation map descriptor. * in-memory aggregate disk allocation map descriptor.
*/ */
struct bmap { struct bmap {
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
* *
* case-insensitive search: * case-insensitive search:
* *
* fold search key; * fold search key;
* *
* case-insensitive search of B-tree: * case-insensitive search of B-tree:
* for internal entry, router key is already folded; * for internal entry, router key is already folded;
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
* else * else
* return no match; * return no match;
* *
* serialization: * serialization:
* target directory inode lock is being held on entry/exit * target directory inode lock is being held on entry/exit
* of all main directory service routines. * of all main directory service routines.
* *
...@@ -925,7 +925,7 @@ int dtInsert(tid_t tid, struct inode *ip, ...@@ -925,7 +925,7 @@ int dtInsert(tid_t tid, struct inode *ip,
* *
* return: 0 - success; * return: 0 - success;
* errno - failure; * errno - failure;
* leaf page unpinned; * leaf page unpinned;
*/ */
static int dtSplitUp(tid_t tid, static int dtSplitUp(tid_t tid,
struct inode *ip, struct dtsplit * split, struct btstack * btstack) struct inode *ip, struct dtsplit * split, struct btstack * btstack)
...@@ -3767,7 +3767,7 @@ static int ciCompare(struct component_name * key, /* search key */ ...@@ -3767,7 +3767,7 @@ static int ciCompare(struct component_name * key, /* search key */
* across page boundary * across page boundary
* *
* return: non-zero on error * return: non-zero on error
* *
*/ */
static int ciGetLeafPrefixKey(dtpage_t * lp, int li, dtpage_t * rp, static int ciGetLeafPrefixKey(dtpage_t * lp, int li, dtpage_t * rp,
int ri, struct component_name * key, int flag) int ri, struct component_name * key, int flag)
...@@ -3780,13 +3780,13 @@ static int ciGetLeafPrefixKey(dtpage_t * lp, int li, dtpage_t * rp, ...@@ -3780,13 +3780,13 @@ static int ciGetLeafPrefixKey(dtpage_t * lp, int li, dtpage_t * rp,
lkey.name = (wchar_t *) kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t), lkey.name = (wchar_t *) kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t),
GFP_KERNEL); GFP_KERNEL);
if (lkey.name == NULL) if (lkey.name == NULL)
return -ENOSPC; return -ENOMEM;
rkey.name = (wchar_t *) kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t), rkey.name = (wchar_t *) kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t),
GFP_KERNEL); GFP_KERNEL);
if (rkey.name == NULL) { if (rkey.name == NULL) {
kfree(lkey.name); kfree(lkey.name);
return -ENOSPC; return -ENOMEM;
} }
/* get left and right key */ /* get left and right key */
......
/* /*
* Copyright (c) International Business Machines Corp., 2000-2002 * Copyright (C) International Business Machines Corp., 2000-2002
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_DTREE #ifndef _H_JFS_DTREE
...@@ -80,7 +80,7 @@ struct idtentry { ...@@ -80,7 +80,7 @@ struct idtentry {
/* /*
* leaf node entry head/only segment * leaf node entry head/only segment
* *
* For legacy filesystems, name contains 13 wchars -- no index field * For legacy filesystems, name contains 13 wchars -- no index field
*/ */
struct ldtentry { struct ldtentry {
__le32 inumber; /* 4: 4-byte aligned */ __le32 inumber; /* 4: 4-byte aligned */
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -125,7 +125,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr) ...@@ -125,7 +125,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr)
} }
/* allocate the disk blocks for the extent. initially, extBalloc() /* allocate the disk blocks for the extent. initially, extBalloc()
* will try to allocate disk blocks for the requested size (xlen). * will try to allocate disk blocks for the requested size (xlen).
* if this fails (xlen contiguous free blocks not avaliable), it'll * if this fails (xlen contiguous free blocks not avaliable), it'll
* try to allocate a smaller number of blocks (producing a smaller * try to allocate a smaller number of blocks (producing a smaller
* extent), with this smaller number of blocks consisting of the * 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,7 +150,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr)
/* determine the value of the extent flag */ /* determine the value of the extent flag */
xflag = abnr ? XAD_NOTRECORDED : 0; xflag = abnr ? XAD_NOTRECORDED : 0;
/* if we can extend the hint extent to cover the current request, /* if we can extend the hint extent to cover the current request,
* extend it. otherwise, insert a new extent to * extend it. otherwise, insert a new extent to
* cover the current request. * cover the current request.
*/ */
...@@ -159,7 +159,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr) ...@@ -159,7 +159,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr)
else else
rc = xtInsert(0, ip, xflag, xoff, (int) nxlen, &nxaddr, 0); rc = xtInsert(0, ip, xflag, xoff, (int) nxlen, &nxaddr, 0);
/* if the extend or insert failed, /* if the extend or insert failed,
* free the newly allocated blocks and return the error. * free the newly allocated blocks and return the error.
*/ */
if (rc) { if (rc) {
...@@ -235,7 +235,7 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, bool abnr) ...@@ -235,7 +235,7 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, bool abnr)
xoff = offsetXAD(xp); xoff = offsetXAD(xp);
/* if the extend page is abnr and if the request is for /* if the extend page is abnr and if the request is for
* the extent to be allocated and recorded, * the extent to be allocated and recorded,
* make the page allocated and recorded. * make the page allocated and recorded.
*/ */
if ((xp->flag & XAD_NOTRECORDED) && !abnr) { if ((xp->flag & XAD_NOTRECORDED) && !abnr) {
...@@ -397,7 +397,7 @@ int extHint(struct inode *ip, s64 offset, xad_t * xp) ...@@ -397,7 +397,7 @@ int extHint(struct inode *ip, s64 offset, xad_t * xp)
if ((rc = xtLookupList(ip, &lxdl, &xadl, 0))) if ((rc = xtLookupList(ip, &lxdl, &xadl, 0)))
return (rc); return (rc);
/* check if not extent exists for the previous page. /* check if not extent exists for the previous page.
* this is possible for sparse files. * this is possible for sparse files.
*/ */
if (xadl.nxad == 0) { if (xadl.nxad == 0) {
...@@ -410,7 +410,7 @@ int extHint(struct inode *ip, s64 offset, xad_t * xp) ...@@ -410,7 +410,7 @@ int extHint(struct inode *ip, s64 offset, xad_t * xp)
*/ */
xp->flag &= XAD_NOTRECORDED; xp->flag &= XAD_NOTRECORDED;
if(xadl.nxad != 1 || lengthXAD(xp) != nbperpage) { if(xadl.nxad != 1 || lengthXAD(xp) != nbperpage) {
jfs_error(ip->i_sb, "extHint: corrupt xtree"); jfs_error(ip->i_sb, "extHint: corrupt xtree");
return -EIO; return -EIO;
} }
...@@ -492,7 +492,7 @@ int extFill(struct inode *ip, xad_t * xp) ...@@ -492,7 +492,7 @@ int extFill(struct inode *ip, xad_t * xp)
* FUNCTION: allocate disk blocks to form an extent. * FUNCTION: allocate disk blocks to form an extent.
* *
* initially, we will try to allocate disk blocks for the * initially, we will try to allocate disk blocks for the
* requested size (nblocks). if this fails (nblocks * requested size (nblocks). if this fails (nblocks
* contiguous free blocks not avaliable), we'll try to allocate * contiguous free blocks not avaliable), we'll try to allocate
* a smaller number of blocks (producing a smaller extent), with * a smaller number of blocks (producing a smaller extent), with
* this smaller number of blocks consisting of the requested * this smaller number of blocks consisting of the requested
...@@ -500,7 +500,7 @@ int extFill(struct inode *ip, xad_t * xp) ...@@ -500,7 +500,7 @@ int extFill(struct inode *ip, xad_t * xp)
* number (i.e. 16 -> 8). we'll continue to round down and * number (i.e. 16 -> 8). we'll continue to round down and
* retry the allocation until the number of blocks to allocate * retry the allocation until the number of blocks to allocate
* is smaller than the number of blocks per page. * is smaller than the number of blocks per page.
* *
* PARAMETERS: * PARAMETERS:
* ip - the inode of the file. * ip - the inode of the file.
* hint - disk block number to be used as an allocation hint. * hint - disk block number to be used as an allocation hint.
...@@ -509,7 +509,7 @@ int extFill(struct inode *ip, xad_t * xp) ...@@ -509,7 +509,7 @@ int extFill(struct inode *ip, xad_t * xp)
* exit, this value is set to the number of blocks actually * exit, this value is set to the number of blocks actually
* allocated. * allocated.
* blkno - pointer to a block address that is filled in on successful * blkno - pointer to a block address that is filled in on successful
* return with the starting block number of the newly * return with the starting block number of the newly
* allocated block range. * allocated block range.
* *
* RETURN VALUES: * RETURN VALUES:
...@@ -530,7 +530,7 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno) ...@@ -530,7 +530,7 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno)
/* get the number of blocks to initially attempt to allocate. /* get the number of blocks to initially attempt to allocate.
* we'll first try the number of blocks requested unless this * we'll first try the number of blocks requested unless this
* number is greater than the maximum number of contiguous free * number is greater than the maximum number of contiguous free
* blocks in the map. in that case, we'll start off with the * blocks in the map. in that case, we'll start off with the
* maximum free. * maximum free.
*/ */
max = (s64) 1 << bmp->db_maxfreebud; max = (s64) 1 << bmp->db_maxfreebud;
...@@ -582,19 +582,19 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno) ...@@ -582,19 +582,19 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno)
* *
* FUNCTION: attempt to extend an extent's allocation. * FUNCTION: attempt to extend an extent's allocation.
* *
* initially, we will try to extend the extent's allocation * Initially, we will try to extend the extent's allocation
* in place. if this fails, we'll try to move the extent * in place. If this fails, we'll try to move the extent
* to a new set of blocks. if moving the extent, we initially * to a new set of blocks. If moving the extent, we initially
* will try to allocate disk blocks for the requested size * will try to allocate disk blocks for the requested size
* (nnew). if this fails (new contiguous free blocks not * (newnblks). if this fails (new contiguous free blocks not
* avaliable), we'll try to allocate a smaller number of * avaliable), we'll try to allocate a smaller number of
* blocks (producing a smaller extent), with this smaller * blocks (producing a smaller extent), with this smaller
* number of blocks consisting of the requested number of * number of blocks consisting of the requested number of
* blocks rounded down to the next smaller power of 2 * blocks rounded down to the next smaller power of 2
* number (i.e. 16 -> 8). we'll continue to round down and * number (i.e. 16 -> 8). We'll continue to round down and
* retry the allocation until the number of blocks to allocate * retry the allocation until the number of blocks to allocate
* is smaller than the number of blocks per page. * is smaller than the number of blocks per page.
* *
* PARAMETERS: * PARAMETERS:
* ip - the inode of the file. * ip - the inode of the file.
* blkno - starting block number of the extents current allocation. * blkno - starting block number of the extents current allocation.
...@@ -625,7 +625,7 @@ extBrealloc(struct inode *ip, ...@@ -625,7 +625,7 @@ extBrealloc(struct inode *ip,
return (rc); return (rc);
} }
/* in place extension not possible. /* in place extension not possible.
* try to move the extent to a new set of blocks. * try to move the extent to a new set of blocks.
*/ */
return (extBalloc(ip, blkno, newnblks, newblkno)); return (extBalloc(ip, blkno, newnblks, newblkno));
......
/* /*
* Copyright (c) International Business Machines Corp., 2000-2001 * Copyright (C) International Business Machines Corp., 2000-2001
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_EXTENT #ifndef _H_JFS_EXTENT
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_FILSYS #ifndef _H_JFS_FILSYS
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
/* /*
* jfs_filsys.h * jfs_filsys.h
* *
* file system (implementation-dependent) constants * file system (implementation-dependent) constants
* *
* refer to <limits.h> for system wide implementation-dependent constants * refer to <limits.h> for system wide implementation-dependent constants
*/ */
/* /*
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
#define JFS_DFS 0x20000000 /* DCE DFS LFS support */ #define JFS_DFS 0x20000000 /* DCE DFS LFS support */
#define JFS_LINUX 0x10000000 /* Linux support */ #define JFS_LINUX 0x10000000 /* Linux support */
/* case-sensitive name/directory support */ /* case-sensitive name/directory support */
/* directory option */ /* directory option */
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
#define JFS_COMMIT 0x00000f00 /* commit option mask */ #define JFS_COMMIT 0x00000f00 /* commit option mask */
#define JFS_GROUPCOMMIT 0x00000100 /* group (of 1) commit */ #define JFS_GROUPCOMMIT 0x00000100 /* group (of 1) commit */
#define JFS_LAZYCOMMIT 0x00000200 /* lazy commit */ #define JFS_LAZYCOMMIT 0x00000200 /* lazy commit */
#define JFS_TMPFS 0x00000400 /* temporary file system - #define JFS_TMPFS 0x00000400 /* temporary file system -
* do not log/commit: * do not log/commit:
*/ */
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
* followed by 1st extent of map * followed by 1st extent of map
*/ */
#define AITBL_OFF (AIMAP_OFF + (SIZE_OF_MAP_PAGE << 1)) #define AITBL_OFF (AIMAP_OFF + (SIZE_OF_MAP_PAGE << 1))
/* /*
* 1st extent of aggregate inode table * 1st extent of aggregate inode table
*/ */
#define SUPER2_OFF (AITBL_OFF + INODE_EXTENT_SIZE) #define SUPER2_OFF (AITBL_OFF + INODE_EXTENT_SIZE)
...@@ -270,13 +270,13 @@ ...@@ -270,13 +270,13 @@
*/ */
#define FM_CLEAN 0x00000000 /* file system is unmounted and clean */ #define FM_CLEAN 0x00000000 /* file system is unmounted and clean */
#define FM_MOUNT 0x00000001 /* file system is mounted cleanly */ #define FM_MOUNT 0x00000001 /* file system is mounted cleanly */
#define FM_DIRTY 0x00000002 /* file system was not unmounted and clean #define FM_DIRTY 0x00000002 /* file system was not unmounted and clean
* when mounted or * when mounted or
* commit failure occurred while being mounted: * commit failure occurred while being mounted:
* fsck() must be run to repair * fsck() must be run to repair
*/ */
#define FM_LOGREDO 0x00000004 /* log based recovery (logredo()) failed: #define FM_LOGREDO 0x00000004 /* log based recovery (logredo()) failed:
* fsck() must be run to repair * fsck() must be run to repair
*/ */
#define FM_EXTENDFS 0x00000008 /* file system extendfs() in progress */ #define FM_EXTENDFS 0x00000008 /* file system extendfs() in progress */
......
此差异已折叠。
/* /*
* Copyright (c) International Business Machines Corp., 2000-2002 * Copyright (C) International Business Machines Corp., 2000-2002
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_IMAP #ifndef _H_JFS_IMAP
...@@ -45,13 +45,13 @@ ...@@ -45,13 +45,13 @@
/* get the starting block number of the 4K page of an inode extent /* get the starting block number of the 4K page of an inode extent
* that contains ino. * that contains ino.
*/ */
#define INOPBLK(pxd,ino,l2nbperpg) (addressPXD((pxd)) + \ #define INOPBLK(pxd,ino,l2nbperpg) (addressPXD((pxd)) + \
((((ino) & (INOSPEREXT-1)) >> L2INOSPERPAGE) << (l2nbperpg))) ((((ino) & (INOSPEREXT-1)) >> L2INOSPERPAGE) << (l2nbperpg)))
/* /*
* inode allocation map: * inode allocation map:
* *
* inode allocation map consists of * inode allocation map consists of
* . the inode map control page and * . the inode map control page and
* . inode allocation group pages (per 4096 inodes) * . inode allocation group pages (per 4096 inodes)
* which are addressed by standard JFS xtree. * which are addressed by standard JFS xtree.
......
...@@ -4,18 +4,18 @@ ...@@ -4,18 +4,18 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_INCORE #ifndef _H_JFS_INCORE
#define _H_JFS_INCORE #define _H_JFS_INCORE
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -61,7 +61,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) ...@@ -61,7 +61,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
inode = new_inode(sb); inode = new_inode(sb);
if (!inode) { if (!inode) {
jfs_warn("ialloc: new_inode returned NULL!"); jfs_warn("ialloc: new_inode returned NULL!");
return inode; return ERR_PTR(-ENOMEM);
} }
jfs_inode = JFS_IP(inode); jfs_inode = JFS_IP(inode);
...@@ -69,9 +69,10 @@ struct inode *ialloc(struct inode *parent, umode_t mode) ...@@ -69,9 +69,10 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
rc = diAlloc(parent, S_ISDIR(mode), inode); rc = diAlloc(parent, S_ISDIR(mode), inode);
if (rc) { if (rc) {
jfs_warn("ialloc: diAlloc returned %d!", rc); jfs_warn("ialloc: diAlloc returned %d!", rc);
make_bad_inode(inode); if (rc == -EIO)
make_bad_inode(inode);
iput(inode); iput(inode);
return NULL; return ERR_PTR(rc);
} }
inode->i_uid = current->fsuid; inode->i_uid = current->fsuid;
...@@ -97,7 +98,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) ...@@ -97,7 +98,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
inode->i_flags |= S_NOQUOTA; inode->i_flags |= S_NOQUOTA;
inode->i_nlink = 0; inode->i_nlink = 0;
iput(inode); iput(inode);
return NULL; return ERR_PTR(-EDQUOT);
} }
inode->i_mode = mode; inode->i_mode = mode;
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_INODE #ifndef _H_JFS_INODE
......
/* /*
* Copyright (c) International Business Machines Corp., 2000-2001 * Copyright (C) International Business Machines Corp., 2000-2001
* Portions Copyright (c) Christoph Hellwig, 2001-2002 * Portions Copyright (C) Christoph Hellwig, 2001-2002
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_LOCK #ifndef _H_JFS_LOCK
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -337,7 +337,7 @@ int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -337,7 +337,7 @@ int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
* PARAMETER: cd - commit descriptor * PARAMETER: cd - commit descriptor
* *
* RETURN: end-of-log address * RETURN: end-of-log address
* *
* serialization: LOG_LOCK() held on entry/exit * serialization: LOG_LOCK() held on entry/exit
*/ */
static int static int
...@@ -554,7 +554,7 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -554,7 +554,7 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
* PARAMETER: log * PARAMETER: log
* *
* RETURN: 0 * RETURN: 0
* *
* serialization: LOG_LOCK() held on entry/exit * serialization: LOG_LOCK() held on entry/exit
*/ */
static int lmNextPage(struct jfs_log * log) static int lmNextPage(struct jfs_log * log)
...@@ -656,7 +656,7 @@ static int lmNextPage(struct jfs_log * log) ...@@ -656,7 +656,7 @@ static int lmNextPage(struct jfs_log * log)
* page number - redrive pageout of the page at the head of * page number - redrive pageout of the page at the head of
* pageout queue until full page has been written. * pageout queue until full page has been written.
* *
* RETURN: * RETURN:
* *
* NOTE: * NOTE:
* LOGGC_LOCK serializes log group commit queue, and * LOGGC_LOCK serializes log group commit queue, and
...@@ -920,10 +920,10 @@ static void lmPostGC(struct lbuf * bp) ...@@ -920,10 +920,10 @@ static void lmPostGC(struct lbuf * bp)
* this code is called again. * this code is called again.
* *
* PARAMETERS: log - log structure * PARAMETERS: log - log structure
* hard_sync - 1 to force all metadata to be written * hard_sync - 1 to force all metadata to be written
* *
* RETURN: 0 * RETURN: 0
* *
* serialization: LOG_LOCK() held on entry/exit * serialization: LOG_LOCK() held on entry/exit
*/ */
static int lmLogSync(struct jfs_log * log, int hard_sync) 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,7 +1052,7 @@ static int lmLogSync(struct jfs_log * log, int hard_sync)
* FUNCTION: write log SYNCPT record for specified log * FUNCTION: write log SYNCPT record for specified log
* *
* PARAMETERS: log - log structure * PARAMETERS: log - log structure
* hard_sync - set to 1 to force metadata to be written * hard_sync - set to 1 to force metadata to be written
*/ */
void jfs_syncpt(struct jfs_log *log, int hard_sync) void jfs_syncpt(struct jfs_log *log, int hard_sync)
{ LOG_LOCK(log); { LOG_LOCK(log);
...@@ -1067,7 +1067,7 @@ void jfs_syncpt(struct jfs_log *log, int hard_sync) ...@@ -1067,7 +1067,7 @@ void jfs_syncpt(struct jfs_log *log, int hard_sync)
* insert filesystem in the active list of the log. * insert filesystem in the active list of the log.
* *
* PARAMETER: ipmnt - file system mount inode * PARAMETER: ipmnt - file system mount inode
* iplog - log inode (out) * iplog - log inode (out)
* *
* RETURN: * RETURN:
* *
...@@ -1082,7 +1082,7 @@ int lmLogOpen(struct super_block *sb) ...@@ -1082,7 +1082,7 @@ int lmLogOpen(struct super_block *sb)
if (sbi->flag & JFS_NOINTEGRITY) if (sbi->flag & JFS_NOINTEGRITY)
return open_dummy_log(sb); return open_dummy_log(sb);
if (sbi->mntflag & JFS_INLINELOG) if (sbi->mntflag & JFS_INLINELOG)
return open_inline_log(sb); return open_inline_log(sb);
...@@ -1131,7 +1131,7 @@ int lmLogOpen(struct super_block *sb) ...@@ -1131,7 +1131,7 @@ int lmLogOpen(struct super_block *sb)
log->bdev = bdev; log->bdev = bdev;
memcpy(log->uuid, sbi->loguuid, sizeof(log->uuid)); memcpy(log->uuid, sbi->loguuid, sizeof(log->uuid));
/* /*
* initialize log: * initialize log:
*/ */
...@@ -1253,13 +1253,13 @@ static int open_dummy_log(struct super_block *sb) ...@@ -1253,13 +1253,13 @@ static int open_dummy_log(struct super_block *sb)
* initialize the log from log superblock. * initialize the log from log superblock.
* set the log state in the superblock to LOGMOUNT and * set the log state in the superblock to LOGMOUNT and
* write SYNCPT log record. * write SYNCPT log record.
* *
* PARAMETER: log - log structure * PARAMETER: log - log structure
* *
* RETURN: 0 - if ok * RETURN: 0 - if ok
* -EINVAL - bad log magic number or superblock dirty * -EINVAL - bad log magic number or superblock dirty
* error returned from logwait() * error returned from logwait()
* *
* serialization: single first open thread * serialization: single first open thread
*/ */
int lmLogInit(struct jfs_log * log) int lmLogInit(struct jfs_log * log)
...@@ -1297,7 +1297,7 @@ int lmLogInit(struct jfs_log * log) ...@@ -1297,7 +1297,7 @@ int lmLogInit(struct jfs_log * log)
if (!test_bit(log_INLINELOG, &log->flag)) if (!test_bit(log_INLINELOG, &log->flag))
log->l2bsize = L2LOGPSIZE; log->l2bsize = L2LOGPSIZE;
/* check for disabled journaling to disk */ /* check for disabled journaling to disk */
if (log->no_integrity) { if (log->no_integrity) {
/* /*
...@@ -1651,7 +1651,7 @@ void jfs_flush_journal(struct jfs_log *log, int wait) ...@@ -1651,7 +1651,7 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
* PARAMETER: log - log inode * PARAMETER: log - log inode
* *
* RETURN: 0 - success * RETURN: 0 - success
* *
* serialization: single last close thread * serialization: single last close thread
*/ */
int lmLogShutdown(struct jfs_log * log) int lmLogShutdown(struct jfs_log * log)
...@@ -1677,7 +1677,7 @@ int lmLogShutdown(struct jfs_log * log) ...@@ -1677,7 +1677,7 @@ int lmLogShutdown(struct jfs_log * log)
lrd.type = cpu_to_le16(LOG_SYNCPT); lrd.type = cpu_to_le16(LOG_SYNCPT);
lrd.length = 0; lrd.length = 0;
lrd.log.syncpt.sync = 0; lrd.log.syncpt.sync = 0;
lsn = lmWriteRecord(log, NULL, &lrd, NULL); lsn = lmWriteRecord(log, NULL, &lrd, NULL);
bp = log->bp; bp = log->bp;
lp = (struct logpage *) bp->l_ldata; lp = (struct logpage *) bp->l_ldata;
...@@ -1703,7 +1703,7 @@ int lmLogShutdown(struct jfs_log * log) ...@@ -1703,7 +1703,7 @@ int lmLogShutdown(struct jfs_log * log)
jfs_info("lmLogShutdown: lsn:0x%x page:%d eor:%d", jfs_info("lmLogShutdown: lsn:0x%x page:%d eor:%d",
lsn, log->page, log->eor); lsn, log->page, log->eor);
out: out:
/* /*
* shutdown per log i/o * shutdown per log i/o
*/ */
...@@ -1769,7 +1769,7 @@ static int lmLogFileSystem(struct jfs_log * log, struct jfs_sb_info *sbi, ...@@ -1769,7 +1769,7 @@ static int lmLogFileSystem(struct jfs_log * log, struct jfs_sb_info *sbi,
lbmFree(bpsuper); lbmFree(bpsuper);
return -EIO; return -EIO;
} }
} }
/* /*
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_LOGMGR #ifndef _H_JFS_LOGMGR
...@@ -35,19 +35,19 @@ ...@@ -35,19 +35,19 @@
/* /*
* log logical volume * log logical volume
* *
* a log is used to make the commit operation on journalled * a log is used to make the commit operation on journalled
* files within the same logical volume group atomic. * files within the same logical volume group atomic.
* a log is implemented with a logical volume. * a log is implemented with a logical volume.
* there is one log per logical volume group. * there is one log per logical volume group.
* *
* block 0 of the log logical volume is not used (ipl etc). * block 0 of the log logical volume is not used (ipl etc).
* block 1 contains a log "superblock" and is used by logFormat(), * block 1 contains a log "superblock" and is used by logFormat(),
* lmLogInit(), lmLogShutdown(), and logRedo() to record status * lmLogInit(), lmLogShutdown(), and logRedo() to record status
* of the log but is not otherwise used during normal processing. * of the log but is not otherwise used during normal processing.
* blocks 2 - (N-1) are used to contain log records. * blocks 2 - (N-1) are used to contain log records.
* *
* when a volume group is varied-on-line, logRedo() must have * when a volume group is varied-on-line, logRedo() must have
* been executed before the file systems (logical volumes) in * been executed before the file systems (logical volumes) in
* the volume group can be mounted. * the volume group can be mounted.
*/ */
/* /*
...@@ -97,26 +97,26 @@ struct logsuper { ...@@ -97,26 +97,26 @@ struct logsuper {
* log logical page * log logical page
* *
* (this comment should be rewritten !) * (this comment should be rewritten !)
* the header and trailer structures (h,t) will normally have * the header and trailer structures (h,t) will normally have
* the same page and eor value. * the same page and eor value.
* An exception to this occurs when a complete page write is not * An exception to this occurs when a complete page write is not
* accomplished on a power failure. Since the hardware may "split write" * accomplished on a power failure. Since the hardware may "split write"
* sectors in the page, any out of order sequence may occur during powerfail * sectors in the page, any out of order sequence may occur during powerfail
* and needs to be recognized during log replay. The xor value is * and needs to be recognized during log replay. The xor value is
* an "exclusive or" of all log words in the page up to eor. This * an "exclusive or" of all log words in the page up to eor. This
* 32 bit eor is stored with the top 16 bits in the header and the * 32 bit eor is stored with the top 16 bits in the header and the
* bottom 16 bits in the trailer. logredo can easily recognize pages * bottom 16 bits in the trailer. logredo can easily recognize pages
* that were not completed by reconstructing this eor and checking * that were not completed by reconstructing this eor and checking
* the log page. * the log page.
* *
* Previous versions of the operating system did not allow split * Previous versions of the operating system did not allow split
* writes and detected partially written records in logredo by * writes and detected partially written records in logredo by
* ordering the updates to the header, trailer, and the move of data * ordering the updates to the header, trailer, and the move of data
* into the logdata area. The order: (1) data is moved (2) header * into the logdata area. The order: (1) data is moved (2) header
* is updated (3) trailer is updated. In logredo, when the header * is updated (3) trailer is updated. In logredo, when the header
* differed from the trailer, the header and trailer were reconciled * differed from the trailer, the header and trailer were reconciled
* as follows: if h.page != t.page they were set to the smaller of * as follows: if h.page != t.page they were set to the smaller of
* the two and h.eor and t.eor set to 8 (i.e. empty page). if (only) * the two and h.eor and t.eor set to 8 (i.e. empty page). if (only)
* h.eor != t.eor they were set to the smaller of their two values. * h.eor != t.eor they were set to the smaller of their two values.
*/ */
struct logpage { struct logpage {
...@@ -147,20 +147,20 @@ struct logpage { ...@@ -147,20 +147,20 @@ struct logpage {
* in a page, pages are written to temporary paging space if * in a page, pages are written to temporary paging space if
* if they must be written to disk before commit, and i/o is * if they must be written to disk before commit, and i/o is
* scheduled for modified pages to their home location after * scheduled for modified pages to their home location after
* the log records containing the after values and the commit * the log records containing the after values and the commit
* record is written to the log on disk, undo discards the copy * record is written to the log on disk, undo discards the copy
* in main-memory.) * in main-memory.)
* *
* a log record consists of a data area of variable length followed by * a log record consists of a data area of variable length followed by
* a descriptor of fixed size LOGRDSIZE bytes. * a descriptor of fixed size LOGRDSIZE bytes.
* the data area is rounded up to an integral number of 4-bytes and * the data area is rounded up to an integral number of 4-bytes and
* must be no longer than LOGPSIZE. * must be no longer than LOGPSIZE.
* the descriptor is of size of multiple of 4-bytes and aligned on a * the descriptor is of size of multiple of 4-bytes and aligned on a
* 4-byte boundary. * 4-byte boundary.
* records are packed one after the other in the data area of log pages. * records are packed one after the other in the data area of log pages.
* (sometimes a DUMMY record is inserted so that at least one record ends * (sometimes a DUMMY record is inserted so that at least one record ends
* on every page or the longest record is placed on at most two pages). * on every page or the longest record is placed on at most two pages).
* the field eor in page header/trailer points to the byte following * the field eor in page header/trailer points to the byte following
* the last record on a page. * the last record on a page.
*/ */
...@@ -270,11 +270,11 @@ struct lrd { ...@@ -270,11 +270,11 @@ struct lrd {
/* /*
* NOREDOINOEXT: the inode extent is freed * NOREDOINOEXT: the inode extent is freed
* *
* do not apply after-image records which precede this * do not apply after-image records which precede this
* record in the log with the any of the 4 page block * record in the log with the any of the 4 page block
* numbers in this inode extent. * numbers in this inode extent.
* *
* NOTE: The fileset and pxd fields MUST remain in * NOTE: The fileset and pxd fields MUST remain in
* the same fields in the REDOPAGE record format. * the same fields in the REDOPAGE record format.
* *
*/ */
...@@ -319,12 +319,10 @@ struct lrd { ...@@ -319,12 +319,10 @@ struct lrd {
* do not apply records which precede this record in the log * do not apply records which precede this record in the log
* with the same inode number. * with the same inode number.
* *
* NOREDILE must be the first to be written at commit * NOREDOFILE must be the first to be written at commit
* (last to be read in logredo()) - it prevents * (last to be read in logredo()) - it prevents
* replay of preceding updates of all preceding generations * replay of preceding updates of all preceding generations
* of the inumber esp. the on-disk inode itself, * of the inumber esp. the on-disk inode itself.
* but does NOT prevent
* replay of the
*/ */
struct { struct {
__le32 fileset; /* 4: fileset number */ __le32 fileset; /* 4: fileset number */
...@@ -332,7 +330,7 @@ struct lrd { ...@@ -332,7 +330,7 @@ struct lrd {
} noredofile; } noredofile;
/* /*
* ? NEWPAGE: * ? NEWPAGE:
* *
* metadata type dependent * metadata type dependent
*/ */
...@@ -464,7 +462,7 @@ struct lbuf { ...@@ -464,7 +462,7 @@ struct lbuf {
s64 l_blkno; /* 8: log page block number */ s64 l_blkno; /* 8: log page block number */
caddr_t l_ldata; /* 4: data page */ caddr_t l_ldata; /* 4: data page */
struct page *l_page; /* The page itself */ struct page *l_page; /* The page itself */
uint l_offset; /* Offset of l_ldata within the page */ uint l_offset; /* Offset of l_ldata within the page */
wait_queue_head_t l_ioevent; /* 4: i/o done event */ wait_queue_head_t l_ioevent; /* 4: i/o done event */
}; };
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -461,7 +461,7 @@ static int metapage_writepage(struct page *page, struct writeback_control *wbc) ...@@ -461,7 +461,7 @@ static int metapage_writepage(struct page *page, struct writeback_control *wbc)
goto add_failed; goto add_failed;
if (!bio->bi_size) if (!bio->bi_size)
goto dump_bio; goto dump_bio;
submit_bio(WRITE, bio); submit_bio(WRITE, bio);
} }
if (redirty) if (redirty)
...@@ -648,7 +648,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, ...@@ -648,7 +648,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
jfs_err("logical_size = %d, size = %d", jfs_err("logical_size = %d, size = %d",
mp->logical_size, size); mp->logical_size, size);
dump_stack(); dump_stack();
goto unlock; goto unlock;
} }
mp->count++; mp->count++;
lock_metapage(mp); lock_metapage(mp);
...@@ -658,7 +658,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, ...@@ -658,7 +658,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
"__get_metapage: using a " "__get_metapage: using a "
"discarded metapage"); "discarded metapage");
discard_metapage(mp); discard_metapage(mp);
goto unlock; goto unlock;
} }
clear_bit(META_discard, &mp->flag); clear_bit(META_discard, &mp->flag);
} }
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_METAPAGE #ifndef _H_JFS_METAPAGE
...@@ -33,7 +33,7 @@ struct metapage { ...@@ -33,7 +33,7 @@ struct metapage {
unsigned long flag; /* See Below */ unsigned long flag; /* See Below */
unsigned long count; /* Reference count */ unsigned long count; /* Reference count */
void *data; /* Data pointer */ void *data; /* Data pointer */
sector_t index; /* block address of page */ sector_t index; /* block address of page */
wait_queue_head_t wait; wait_queue_head_t wait;
/* implementation */ /* implementation */
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -21,18 +21,18 @@ ...@@ -21,18 +21,18 @@
* *
* note: file system in transition to aggregate/fileset: * note: file system in transition to aggregate/fileset:
* *
* file system mount is interpreted as the mount of aggregate, * file system mount is interpreted as the mount of aggregate,
* if not already mounted, and mount of the single/only fileset in * if not already mounted, and mount of the single/only fileset in
* the aggregate; * the aggregate;
* *
* a file system/aggregate is represented by an internal inode * a file system/aggregate is represented by an internal inode
* (aka mount inode) initialized with aggregate superblock; * (aka mount inode) initialized with aggregate superblock;
* each vfs represents a fileset, and points to its "fileset inode * each vfs represents a fileset, and points to its "fileset inode
* allocation map inode" (aka fileset inode): * allocation map inode" (aka fileset inode):
* (an aggregate itself is structured recursively as a filset: * (an aggregate itself is structured recursively as a filset:
* an internal vfs is constructed and points to its "fileset inode * an internal vfs is constructed and points to its "fileset inode
* allocation map inode" (aka aggregate inode) where each inode * allocation map inode" (aka aggregate inode) where each inode
* represents a fileset inode) so that inode number is mapped to * represents a fileset inode) so that inode number is mapped to
* on-disk inode in uniform way at both aggregate and fileset level; * on-disk inode in uniform way at both aggregate and fileset level;
* *
* each vnode/inode of a fileset is linked to its vfs (to facilitate * each vnode/inode of a fileset is linked to its vfs (to facilitate
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
* per aggregate information, e.g., block size, etc.) as well as * per aggregate information, e.g., block size, etc.) as well as
* its file set inode. * its file set inode.
* *
* aggregate * aggregate
* ipmnt * ipmnt
* mntvfs -> fileset ipimap+ -> aggregate ipbmap -> aggregate ipaimap; * mntvfs -> fileset ipimap+ -> aggregate ipbmap -> aggregate ipaimap;
* fileset vfs -> vp(1) <-> ... <-> vp(n) <->vproot; * fileset vfs -> vp(1) <-> ... <-> vp(n) <->vproot;
...@@ -88,7 +88,7 @@ int jfs_mount(struct super_block *sb) ...@@ -88,7 +88,7 @@ int jfs_mount(struct super_block *sb)
struct inode *ipbmap = NULL; struct inode *ipbmap = NULL;
/* /*
* read/validate superblock * read/validate superblock
* (initialize mount inode from the superblock) * (initialize mount inode from the superblock)
*/ */
if ((rc = chkSuper(sb))) { if ((rc = chkSuper(sb))) {
...@@ -238,7 +238,7 @@ int jfs_mount(struct super_block *sb) ...@@ -238,7 +238,7 @@ int jfs_mount(struct super_block *sb)
*/ */
int jfs_mount_rw(struct super_block *sb, int remount) int jfs_mount_rw(struct super_block *sb, int remount)
{ {
struct jfs_sb_info *sbi = JFS_SBI(sb); struct jfs_sb_info *sbi = JFS_SBI(sb);
int rc; int rc;
/* /*
...@@ -291,7 +291,7 @@ int jfs_mount_rw(struct super_block *sb, int remount) ...@@ -291,7 +291,7 @@ int jfs_mount_rw(struct super_block *sb, int remount)
/* /*
* chkSuper() * chkSuper()
* *
* validate the superblock of the file system to be mounted and * validate the superblock of the file system to be mounted and
* get the file system parameters. * get the file system parameters.
* *
* returns * returns
...@@ -426,7 +426,7 @@ int updateSuper(struct super_block *sb, uint state) ...@@ -426,7 +426,7 @@ int updateSuper(struct super_block *sb, uint state)
jfs_err("updateSuper: bad state"); jfs_err("updateSuper: bad state");
} else if (sbi->state == FM_DIRTY) } else if (sbi->state == FM_DIRTY)
return 0; return 0;
if ((rc = readSuper(sb, &bh))) if ((rc = readSuper(sb, &bh)))
return rc; return rc;
...@@ -486,9 +486,9 @@ int readSuper(struct super_block *sb, struct buffer_head **bpp) ...@@ -486,9 +486,9 @@ int readSuper(struct super_block *sb, struct buffer_head **bpp)
* for this file system past this point in log. * for this file system past this point in log.
* it is harmless if mount fails. * it is harmless if mount fails.
* *
* note: MOUNT record is at aggregate level, not at fileset level, * note: MOUNT record is at aggregate level, not at fileset level,
* since log records of previous mounts of a fileset * since log records of previous mounts of a fileset
* (e.g., AFTER record of extent allocation) have to be processed * (e.g., AFTER record of extent allocation) have to be processed
* to update block allocation map at aggregate level. * to update block allocation map at aggregate level.
*/ */
static int logMOUNT(struct super_block *sb) static int logMOUNT(struct super_block *sb)
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_SUPERBLOCK #ifndef _H_JFS_SUPERBLOCK
...@@ -21,14 +21,14 @@ ...@@ -21,14 +21,14 @@
/* /*
* make the magic number something a human could read * make the magic number something a human could read
*/ */
#define JFS_MAGIC "JFS1" /* Magic word */ #define JFS_MAGIC "JFS1" /* Magic word */
#define JFS_VERSION 2 /* Version number: Version 2 */ #define JFS_VERSION 2 /* Version number: Version 2 */
#define LV_NAME_SIZE 11 /* MUST BE 11 for OS/2 boot sector */ #define LV_NAME_SIZE 11 /* MUST BE 11 for OS/2 boot sector */
/* /*
* aggregate superblock * aggregate superblock
* *
* The name superblock is too close to super_block, so the name has been * The name superblock is too close to super_block, so the name has been
* changed to jfs_superblock. The utilities are still using the old name. * changed to jfs_superblock. The utilities are still using the old name.
...@@ -40,7 +40,7 @@ struct jfs_superblock { ...@@ -40,7 +40,7 @@ struct jfs_superblock {
__le64 s_size; /* 8: aggregate size in hardware/LVM blocks; __le64 s_size; /* 8: aggregate size in hardware/LVM blocks;
* VFS: number of blocks * VFS: number of blocks
*/ */
__le32 s_bsize; /* 4: aggregate block size in bytes; __le32 s_bsize; /* 4: aggregate block size in bytes;
* VFS: fragment size * VFS: fragment size
*/ */
__le16 s_l2bsize; /* 2: log2 of s_bsize */ __le16 s_l2bsize; /* 2: log2 of s_bsize */
...@@ -54,7 +54,7 @@ struct jfs_superblock { ...@@ -54,7 +54,7 @@ struct jfs_superblock {
__le32 s_flag; /* 4: aggregate attributes: __le32 s_flag; /* 4: aggregate attributes:
* see jfs_filsys.h * see jfs_filsys.h
*/ */
__le32 s_state; /* 4: mount/unmount/recovery state: __le32 s_state; /* 4: mount/unmount/recovery state:
* see jfs_filsys.h * see jfs_filsys.h
*/ */
__le32 s_compress; /* 4: > 0 if data compression */ __le32 s_compress; /* 4: > 0 if data compression */
...@@ -75,11 +75,11 @@ struct jfs_superblock { ...@@ -75,11 +75,11 @@ struct jfs_superblock {
struct timestruc_t s_time; /* 8: time last updated */ struct timestruc_t s_time; /* 8: time last updated */
__le32 s_fsckloglen; /* 4: Number of filesystem blocks reserved for __le32 s_fsckloglen; /* 4: Number of filesystem blocks reserved for
* the fsck service log. * the fsck service log.
* N.B. These blocks are divided among the * N.B. These blocks are divided among the
* versions kept. This is not a per * versions kept. This is not a per
* version size. * version size.
* N.B. These blocks are included in the * N.B. These blocks are included in the
* length field of s_fsckpxd. * length field of s_fsckpxd.
*/ */
s8 s_fscklog; /* 1: which fsck service log is most recent s8 s_fscklog; /* 1: which fsck service log is most recent
...@@ -87,7 +87,7 @@ struct jfs_superblock { ...@@ -87,7 +87,7 @@ struct jfs_superblock {
* 1 => the first one * 1 => the first one
* 2 => the 2nd one * 2 => the 2nd one
*/ */
char s_fpack[11]; /* 11: file system volume name char s_fpack[11]; /* 11: file system volume name
* N.B. This must be 11 bytes to * N.B. This must be 11 bytes to
* conform with the OS/2 BootSector * conform with the OS/2 BootSector
* requirements * requirements
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -2026,8 +2026,6 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -2026,8 +2026,6 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
* truncate entry XAD[twm == next - 1]: * truncate entry XAD[twm == next - 1]:
*/ */
if (twm == next - 1) { if (twm == next - 1) {
struct pxd_lock *pxdlock;
/* format a maplock for txUpdateMap() to update bmap /* format a maplock for txUpdateMap() to update bmap
* to free truncated delta extent of the truncated * to free truncated delta extent of the truncated
* entry XAD[next - 1]; * entry XAD[next - 1];
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_TXNMGR #ifndef _H_JFS_TXNMGR
...@@ -179,7 +179,7 @@ struct linelock { ...@@ -179,7 +179,7 @@ struct linelock {
/* (8) */ /* (8) */
struct lv lv[20]; /* 40: */ struct lv lv[20]; /* 40: */
}; /* (48) */ }; /* (48) */
#define dt_lock linelock #define dt_lock linelock
...@@ -211,8 +211,8 @@ struct xtlock { ...@@ -211,8 +211,8 @@ struct xtlock {
* at tlock.lock/linelock: watch for alignment; * at tlock.lock/linelock: watch for alignment;
* N.B. next field may be set by linelock, and should not * N.B. next field may be set by linelock, and should not
* be modified by maplock; * be modified by maplock;
* N.B. index of the first pxdlock specifies index of next * N.B. index of the first pxdlock specifies index of next
* free maplock (i.e., number of maplock) in the tlock; * free maplock (i.e., number of maplock) in the tlock;
*/ */
struct maplock { struct maplock {
lid_t next; /* 2: */ lid_t next; /* 2: */
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
* note: file system in transition to aggregate/fileset: * note: file system in transition to aggregate/fileset:
* (ref. jfs_mount.c) * (ref. jfs_mount.c)
* *
* file system unmount is interpreted as mount of the single/only * file system unmount is interpreted as mount of the single/only
* fileset in the aggregate and, if unmount of the last fileset, * fileset in the aggregate and, if unmount of the last fileset,
* as unmount of the aggerate; * as unmount of the aggerate;
*/ */
...@@ -60,13 +60,13 @@ int jfs_umount(struct super_block *sb) ...@@ -60,13 +60,13 @@ int jfs_umount(struct super_block *sb)
jfs_info("UnMount JFS: sb:0x%p", sb); jfs_info("UnMount JFS: sb:0x%p", sb);
/* /*
* update superblock and close log * update superblock and close log
* *
* if mounted read-write and log based recovery was enabled * if mounted read-write and log based recovery was enabled
*/ */
if ((log = sbi->log)) if ((log = sbi->log))
/* /*
* Wait for outstanding transactions to be written to log: * Wait for outstanding transactions to be written to log:
*/ */
jfs_flush_journal(log, 2); jfs_flush_journal(log, 2);
...@@ -112,17 +112,17 @@ int jfs_umount(struct super_block *sb) ...@@ -112,17 +112,17 @@ int jfs_umount(struct super_block *sb)
/* /*
* ensure all file system file pages are propagated to their * ensure all file system file pages are propagated to their
* home blocks on disk (and their in-memory buffer pages are * home blocks on disk (and their in-memory buffer pages are
* invalidated) BEFORE updating file system superblock state * invalidated) BEFORE updating file system superblock state
* (to signify file system is unmounted cleanly, and thus in * (to signify file system is unmounted cleanly, and thus in
* consistent state) and log superblock active file system * consistent state) and log superblock active file system
* list (to signify skip logredo()). * list (to signify skip logredo()).
*/ */
if (log) { /* log = NULL if read-only mount */ if (log) { /* log = NULL if read-only mount */
updateSuper(sb, FM_CLEAN); updateSuper(sb, FM_CLEAN);
/* /*
* close log: * close log:
* *
* remove file system from log active file system list. * remove file system from log active file system list.
*/ */
...@@ -142,7 +142,7 @@ int jfs_umount_rw(struct super_block *sb) ...@@ -142,7 +142,7 @@ int jfs_umount_rw(struct super_block *sb)
return 0; return 0;
/* /*
* close log: * close log:
* *
* remove file system from log active file system list. * remove file system from log active file system list.
*/ */
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -57,8 +57,8 @@ int jfs_strfromUCS_le(char *to, const __le16 * from, ...@@ -57,8 +57,8 @@ int jfs_strfromUCS_le(char *to, const __le16 * from,
warn--; warn--;
warn_again--; warn_again--;
printk(KERN_ERR printk(KERN_ERR
"non-latin1 character 0x%x found in JFS file name\n", "non-latin1 character 0x%x found in JFS file name\n",
le16_to_cpu(from[i])); le16_to_cpu(from[i]));
printk(KERN_ERR printk(KERN_ERR
"mount with iocharset=utf8 to access\n"); "mount with iocharset=utf8 to access\n");
} }
...@@ -124,7 +124,7 @@ int get_UCSname(struct component_name * uniName, struct dentry *dentry) ...@@ -124,7 +124,7 @@ int get_UCSname(struct component_name * uniName, struct dentry *dentry)
kmalloc((length + 1) * sizeof(wchar_t), GFP_NOFS); kmalloc((length + 1) * sizeof(wchar_t), GFP_NOFS);
if (uniName->name == NULL) if (uniName->name == NULL)
return -ENOSPC; return -ENOMEM;
uniName->namlen = jfs_strtoUCS(uniName->name, dentry->d_name.name, uniName->namlen = jfs_strtoUCS(uniName->name, dentry->d_name.name,
length, nls_tab); length, nls_tab);
......
/* /*
* Copyright (c) International Business Machines Corp., 2000-2002 * Copyright (C) International Business Machines Corp., 2000-2002
* Portions Copyright (c) Christoph Hellwig, 2001-2002 * Portions Copyright (C) Christoph Hellwig, 2001-2002
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_UNICODE #ifndef _H_JFS_UNICODE
......
/* /*
* Copyright (c) International Business Machines Corp., 2000-2002 * Copyright (C) International Business Machines Corp., 2000-2002
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
......
/* /*
* Copyright (c) International Business Machines Corp., 2000-2002 * Copyright (C) International Business Machines Corp., 2000-2002
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
...@@ -2428,7 +2428,7 @@ printf("xtUpdate.updateLeft.split p:0x%p\n", p); ...@@ -2428,7 +2428,7 @@ printf("xtUpdate.updateLeft.split p:0x%p\n", p);
* return: * return:
*/ */
int xtAppend(tid_t tid, /* transaction id */ int xtAppend(tid_t tid, /* transaction id */
struct inode *ip, int xflag, s64 xoff, s32 maxblocks, struct inode *ip, int xflag, s64 xoff, s32 maxblocks,
s32 * xlenp, /* (in/out) */ s32 * xlenp, /* (in/out) */
s64 * xaddrp, /* (in/out) */ s64 * xaddrp, /* (in/out) */
int flag) int flag)
...@@ -2499,7 +2499,7 @@ int xtAppend(tid_t tid, /* transaction id */ ...@@ -2499,7 +2499,7 @@ int xtAppend(tid_t tid, /* transaction id */
pxdlist.maxnpxd = pxdlist.npxd = 0; pxdlist.maxnpxd = pxdlist.npxd = 0;
pxd = &pxdlist.pxd[0]; pxd = &pxdlist.pxd[0];
nblocks = JFS_SBI(ip->i_sb)->nbperpage; nblocks = JFS_SBI(ip->i_sb)->nbperpage;
for (; nsplit > 0; nsplit--, pxd++, xaddr += nblocks, maxblocks -= nblocks) { for (; nsplit > 0; nsplit--, pxd++, xaddr += nblocks, maxblocks -= nblocks) {
if ((rc = dbAllocBottomUp(ip, xaddr, (s64) nblocks)) == 0) { if ((rc = dbAllocBottomUp(ip, xaddr, (s64) nblocks)) == 0) {
PXDaddress(pxd, xaddr); PXDaddress(pxd, xaddr);
PXDlength(pxd, nblocks); PXDlength(pxd, nblocks);
...@@ -2514,7 +2514,7 @@ int xtAppend(tid_t tid, /* transaction id */ ...@@ -2514,7 +2514,7 @@ int xtAppend(tid_t tid, /* transaction id */
goto out; goto out;
} }
xlen = min(xlen, maxblocks); xlen = min(xlen, maxblocks);
/* /*
* allocate data extent requested * allocate data extent requested
......
/* /*
* Copyright (c) International Business Machines Corp., 2000-2002 * Copyright (C) International Business Machines Corp., 2000-2002
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _H_JFS_XTREE #ifndef _H_JFS_XTREE
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -41,7 +41,7 @@ static s64 commitZeroLink(tid_t, struct inode *); ...@@ -41,7 +41,7 @@ static s64 commitZeroLink(tid_t, struct inode *);
/* /*
* NAME: free_ea_wmap(inode) * NAME: free_ea_wmap(inode)
* *
* FUNCTION: free uncommitted extended attributes from working map * FUNCTION: free uncommitted extended attributes from working map
* *
*/ */
static inline void free_ea_wmap(struct inode *inode) static inline void free_ea_wmap(struct inode *inode)
...@@ -62,7 +62,7 @@ static inline void free_ea_wmap(struct inode *inode) ...@@ -62,7 +62,7 @@ static inline void free_ea_wmap(struct inode *inode)
* FUNCTION: create a regular file in the parent directory <dip> * FUNCTION: create a regular file in the parent directory <dip>
* with name = <from dentry> and mode = <mode> * with name = <from dentry> and mode = <mode>
* *
* PARAMETER: dip - parent directory vnode * PARAMETER: dip - parent directory vnode
* dentry - dentry of new file * dentry - dentry of new file
* mode - create mode (rwxrwxrwx). * mode - create mode (rwxrwxrwx).
* nd- nd struct * nd- nd struct
...@@ -97,8 +97,8 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, int mode, ...@@ -97,8 +97,8 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
* begin the transaction before we search the directory. * begin the transaction before we search the directory.
*/ */
ip = ialloc(dip, mode); ip = ialloc(dip, mode);
if (ip == NULL) { if (IS_ERR(ip)) {
rc = -ENOSPC; rc = PTR_ERR(ip);
goto out2; goto out2;
} }
...@@ -190,7 +190,7 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, int mode, ...@@ -190,7 +190,7 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
* FUNCTION: create a child directory in the parent directory <dip> * FUNCTION: create a child directory in the parent directory <dip>
* with name = <from dentry> and mode = <mode> * with name = <from dentry> and mode = <mode>
* *
* PARAMETER: dip - parent directory vnode * PARAMETER: dip - parent directory vnode
* dentry - dentry of child directory * dentry - dentry of child directory
* mode - create mode (rwxrwxrwx). * mode - create mode (rwxrwxrwx).
* *
...@@ -231,8 +231,8 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) ...@@ -231,8 +231,8 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
* begin the transaction before we search the directory. * begin the transaction before we search the directory.
*/ */
ip = ialloc(dip, S_IFDIR | mode); ip = ialloc(dip, S_IFDIR | mode);
if (ip == NULL) { if (IS_ERR(ip)) {
rc = -ENOSPC; rc = PTR_ERR(ip);
goto out2; goto out2;
} }
...@@ -324,7 +324,7 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) ...@@ -324,7 +324,7 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
* *
* FUNCTION: remove a link to child directory * FUNCTION: remove a link to child directory
* *
* PARAMETER: dip - parent inode * PARAMETER: dip - parent inode
* dentry - child directory dentry * dentry - child directory dentry
* *
* RETURN: -EINVAL - if name is . or .. * RETURN: -EINVAL - if name is . or ..
...@@ -332,10 +332,10 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) ...@@ -332,10 +332,10 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
* errors from subroutines * errors from subroutines
* *
* note: * note:
* if other threads have the directory open when the last link * if other threads have the directory open when the last link
* is removed, the "." and ".." entries, if present, are removed before * is removed, the "." and ".." entries, if present, are removed before
* rmdir() returns and no new entries may be created in the directory, * rmdir() returns and no new entries may be created in the directory,
* but the directory is not removed until the last reference to * but the directory is not removed until the last reference to
* the directory is released (cf.unlink() of regular file). * the directory is released (cf.unlink() of regular file).
*/ */
static int jfs_rmdir(struct inode *dip, struct dentry *dentry) 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,11 +446,11 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
/* /*
* NAME: jfs_unlink(dip, dentry) * NAME: jfs_unlink(dip, dentry)
* *
* FUNCTION: remove a link to object <vp> named by <name> * FUNCTION: remove a link to object <vp> named by <name>
* from parent directory <dvp> * from parent directory <dvp>
* *
* PARAMETER: dip - inode of parent directory * PARAMETER: dip - inode of parent directory
* dentry - dentry of object to be removed * dentry - dentry of object to be removed
* *
* RETURN: errors from subroutines * RETURN: errors from subroutines
* *
...@@ -598,7 +598,7 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry) ...@@ -598,7 +598,7 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry)
* *
* FUNCTION: for non-directory, called by jfs_remove(), * FUNCTION: for non-directory, called by jfs_remove(),
* truncate a regular file, directory or symbolic * truncate a regular file, directory or symbolic
* link to zero length. return 0 if type is not * link to zero length. return 0 if type is not
* one of these. * one of these.
* *
* if the file is currently associated with a VM segment * 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,7 +608,7 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry)
* map by ctrunc1. * map by ctrunc1.
* if there is no VM segment on entry, the resources are * if there is no VM segment on entry, the resources are
* freed in both work and permanent map. * freed in both work and permanent map.
* (? for temporary file - memory object is cached even * (? for temporary file - memory object is cached even
* after no reference: * after no reference:
* reference count > 0 - ) * reference count > 0 - )
* *
...@@ -662,7 +662,7 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip) ...@@ -662,7 +662,7 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip)
/* /*
* free xtree/data (truncate to zero length): * free xtree/data (truncate to zero length):
* free xtree/data pages from cache if COMMIT_PWMAP, * free xtree/data pages from cache if COMMIT_PWMAP,
* free xtree/data blocks from persistent block map, and * free xtree/data blocks from persistent block map, and
* free xtree/data blocks from working block map if COMMIT_PWMAP; * free xtree/data blocks from working block map if COMMIT_PWMAP;
*/ */
...@@ -677,7 +677,7 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip) ...@@ -677,7 +677,7 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip)
* NAME: jfs_free_zero_link() * NAME: jfs_free_zero_link()
* *
* FUNCTION: for non-directory, called by iClose(), * FUNCTION: for non-directory, called by iClose(),
* free resources of a file from cache and WORKING map * free resources of a file from cache and WORKING map
* for a file previously committed with zero link count * for a file previously committed with zero link count
* while associated with a pager object, * while associated with a pager object,
* *
...@@ -762,7 +762,7 @@ void jfs_free_zero_link(struct inode *ip) ...@@ -762,7 +762,7 @@ void jfs_free_zero_link(struct inode *ip)
* FUNCTION: create a link to <vp> by the name = <name> * FUNCTION: create a link to <vp> by the name = <name>
* in the parent directory <dvp> * in the parent directory <dvp>
* *
* PARAMETER: vp - target object * PARAMETER: vp - target object
* dvp - parent directory of new link * dvp - parent directory of new link
* name - name of new link to target object * name - name of new link to target object
* crp - credential * crp - credential
...@@ -858,8 +858,8 @@ static int jfs_link(struct dentry *old_dentry, ...@@ -858,8 +858,8 @@ static int jfs_link(struct dentry *old_dentry,
* in directory <dip> * in directory <dip>
* *
* PARAMETER: dip - parent directory vnode * PARAMETER: dip - parent directory vnode
* dentry - dentry of symbolic link * dentry - dentry of symbolic link
* name - the path name of the existing object * name - the path name of the existing object
* that will be the source of the link * that will be the source of the link
* *
* RETURN: errors from subroutines * RETURN: errors from subroutines
...@@ -906,8 +906,8 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, ...@@ -906,8 +906,8 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
* (iAlloc() returns new, locked inode) * (iAlloc() returns new, locked inode)
*/ */
ip = ialloc(dip, S_IFLNK | 0777); ip = ialloc(dip, S_IFLNK | 0777);
if (ip == NULL) { if (IS_ERR(ip)) {
rc = -ENOSPC; rc = PTR_ERR(ip);
goto out2; goto out2;
} }
...@@ -926,7 +926,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, ...@@ -926,7 +926,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
tblk->u.ixpxd = JFS_IP(ip)->ixpxd; tblk->u.ixpxd = JFS_IP(ip)->ixpxd;
/* fix symlink access permission /* fix symlink access permission
* (dir_create() ANDs in the u.u_cmask, * (dir_create() ANDs in the u.u_cmask,
* but symlinks really need to be 777 access) * but symlinks really need to be 777 access)
*/ */
ip->i_mode |= 0777; ip->i_mode |= 0777;
...@@ -967,7 +967,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, ...@@ -967,7 +967,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
ip->i_mapping->a_ops = &jfs_aops; ip->i_mapping->a_ops = &jfs_aops;
/* /*
* even though the data of symlink object (source * even though the data of symlink object (source
* path name) is treated as non-journaled user data, * path name) is treated as non-journaled user data,
* it is read/written thru buffer cache for performance. * it is read/written thru buffer cache for performance.
*/ */
...@@ -978,7 +978,6 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, ...@@ -978,7 +978,6 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
xlen = xsize >> JFS_SBI(sb)->l2bsize; xlen = xsize >> JFS_SBI(sb)->l2bsize;
if ((rc = xtInsert(tid, ip, 0, 0, xlen, &xaddr, 0))) { if ((rc = xtInsert(tid, ip, 0, 0, xlen, &xaddr, 0))) {
txAbort(tid, 0); txAbort(tid, 0);
rc = -ENOSPC;
goto out3; goto out3;
} }
extent = xaddr; extent = xaddr;
...@@ -1176,7 +1175,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1176,7 +1175,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
/* free block resources */ /* free block resources */
if ((new_size = commitZeroLink(tid, new_ip)) < 0) { if ((new_size = commitZeroLink(tid, new_ip)) < 0) {
txAbort(tid, 1); /* Marks FS Dirty */ txAbort(tid, 1); /* Marks FS Dirty */
rc = new_size; rc = new_size;
goto out4; goto out4;
} }
tblk = tid_to_tblock(tid); tblk = tid_to_tblock(tid);
...@@ -1292,7 +1291,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1292,7 +1291,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
new_size = xtTruncate_pmap(tid, new_ip, new_size); new_size = xtTruncate_pmap(tid, new_ip, new_size);
if (new_size < 0) { if (new_size < 0) {
txAbort(tid, 1); txAbort(tid, 1);
rc = new_size; rc = new_size;
} else } else
rc = txCommit(tid, 1, &new_ip, COMMIT_SYNC); rc = txCommit(tid, 1, &new_ip, COMMIT_SYNC);
txEnd(tid); txEnd(tid);
...@@ -1350,8 +1349,8 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry, ...@@ -1350,8 +1349,8 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry,
goto out; goto out;
ip = ialloc(dir, mode); ip = ialloc(dir, mode);
if (ip == NULL) { if (IS_ERR(ip)) {
rc = -ENOSPC; rc = PTR_ERR(ip);
goto out1; goto out1;
} }
jfs_ip = JFS_IP(ip); jfs_ip = JFS_IP(ip);
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -82,7 +82,7 @@ static void jfs_handle_error(struct super_block *sb) ...@@ -82,7 +82,7 @@ static void jfs_handle_error(struct super_block *sb)
"as read-only\n", "as read-only\n",
sb->s_id); sb->s_id);
sb->s_flags |= MS_RDONLY; sb->s_flags |= MS_RDONLY;
} }
/* nothing is done for continue beyond marking the superblock dirty */ /* nothing is done for continue beyond marking the superblock dirty */
} }
...@@ -422,7 +422,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -422,7 +422,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
sbi = kzalloc(sizeof (struct jfs_sb_info), GFP_KERNEL); sbi = kzalloc(sizeof (struct jfs_sb_info), GFP_KERNEL);
if (!sbi) if (!sbi)
return -ENOSPC; return -ENOMEM;
sb->s_fs_info = sbi; sb->s_fs_info = sbi;
sbi->sb = sb; sbi->sb = sb;
sbi->uid = sbi->gid = sbi->umask = -1; sbi->uid = sbi->gid = sbi->umask = -1;
...@@ -775,7 +775,7 @@ static int __init init_jfs_fs(void) ...@@ -775,7 +775,7 @@ static int __init init_jfs_fs(void)
int rc; int rc;
jfs_inode_cachep = jfs_inode_cachep =
kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0, kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0,
SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
init_once, NULL); init_once, NULL);
if (jfs_inode_cachep == NULL) if (jfs_inode_cachep == NULL)
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details. * the GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
* *
* 0 4 4 + EA_SIZE(ea1) * 0 4 4 + EA_SIZE(ea1)
* +------------+-------------------+--------------------+----- * +------------+-------------------+--------------------+-----
* | Overall EA | First FEA Element | Second FEA Element | ..... * | Overall EA | First FEA Element | Second FEA Element | .....
* | List Size | | | * | List Size | | |
* +------------+-------------------+--------------------+----- * +------------+-------------------+--------------------+-----
* *
...@@ -155,9 +155,9 @@ static void ea_release(struct inode *inode, struct ea_buffer *ea_buf); ...@@ -155,9 +155,9 @@ static void ea_release(struct inode *inode, struct ea_buffer *ea_buf);
/* /*
* NAME: ea_write_inline * NAME: ea_write_inline
* *
* FUNCTION: Attempt to write an EA inline if area is available * FUNCTION: Attempt to write an EA inline if area is available
* *
* PRE CONDITIONS: * PRE CONDITIONS:
* Already verified that the specified EA is small enough to fit inline * Already verified that the specified EA is small enough to fit inline
* *
...@@ -216,10 +216,10 @@ static int ea_write_inline(struct inode *ip, struct jfs_ea_list *ealist, ...@@ -216,10 +216,10 @@ static int ea_write_inline(struct inode *ip, struct jfs_ea_list *ealist,
/* /*
* NAME: ea_write * NAME: ea_write
* *
* FUNCTION: Write an EA for an inode * FUNCTION: Write an EA for an inode
* *
* PRE CONDITIONS: EA has been verified * PRE CONDITIONS: EA has been verified
* *
* PARAMETERS: * PARAMETERS:
* ip - Inode pointer * ip - Inode pointer
...@@ -340,9 +340,9 @@ static int ea_write(struct inode *ip, struct jfs_ea_list *ealist, int size, ...@@ -340,9 +340,9 @@ static int ea_write(struct inode *ip, struct jfs_ea_list *ealist, int size,
/* /*
* NAME: ea_read_inline * NAME: ea_read_inline
* *
* FUNCTION: Read an inlined EA into user's buffer * FUNCTION: Read an inlined EA into user's buffer
* *
* PARAMETERS: * PARAMETERS:
* ip - Inode pointer * ip - Inode pointer
* ealist - Pointer to buffer to fill in with EA * 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,9 +372,9 @@ static int ea_read_inline(struct inode *ip, struct jfs_ea_list *ealist)
/* /*
* NAME: ea_read * NAME: ea_read
* *
* FUNCTION: copy EA data into user's buffer * FUNCTION: copy EA data into user's buffer
* *
* PARAMETERS: * PARAMETERS:
* ip - Inode pointer * ip - Inode pointer
* ealist - Pointer to buffer to fill in with EA * 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,7 +406,7 @@ static int ea_read(struct inode *ip, struct jfs_ea_list *ealist)
return -EIO; return -EIO;
} }
/* /*
* Figure out how many blocks were allocated when this EA list was * Figure out how many blocks were allocated when this EA list was
* originally written to disk. * originally written to disk.
*/ */
...@@ -443,14 +443,14 @@ static int ea_read(struct inode *ip, struct jfs_ea_list *ealist) ...@@ -443,14 +443,14 @@ static int ea_read(struct inode *ip, struct jfs_ea_list *ealist)
/* /*
* NAME: ea_get * NAME: ea_get
* *
* FUNCTION: Returns buffer containing existing extended attributes. * FUNCTION: Returns buffer containing existing extended attributes.
* The size of the buffer will be the larger of the existing * The size of the buffer will be the larger of the existing
* attributes size, or min_size. * attributes size, or min_size.
* *
* The buffer, which may be inlined in the inode or in the * The buffer, which may be inlined in the inode or in the
* page cache must be release by calling ea_release or ea_put * page cache must be release by calling ea_release or ea_put
* *
* PARAMETERS: * PARAMETERS:
* inode - Inode pointer * inode - Inode pointer
* ea_buf - Structure to be populated with ealist and its metadata * 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,7 +1054,7 @@ ssize_t jfs_listxattr(struct dentry * dentry, char *data, size_t buf_size)
/* compute required size of list */ /* compute required size of list */
for (ea = FIRST_EA(ealist); ea < END_EALIST(ealist); ea = NEXT_EA(ea)) { for (ea = FIRST_EA(ealist); ea < END_EALIST(ealist); ea = NEXT_EA(ea)) {
if (can_list(ea)) if (can_list(ea))
size += name_size(ea) + 1; size += name_size(ea) + 1;
} }
...@@ -1069,7 +1069,7 @@ ssize_t jfs_listxattr(struct dentry * dentry, char *data, size_t buf_size) ...@@ -1069,7 +1069,7 @@ ssize_t jfs_listxattr(struct dentry * dentry, char *data, size_t buf_size)
/* Copy attribute names to buffer */ /* Copy attribute names to buffer */
buffer = data; buffer = data;
for (ea = FIRST_EA(ealist); ea < END_EALIST(ealist); ea = NEXT_EA(ea)) { for (ea = FIRST_EA(ealist); ea < END_EALIST(ealist); ea = NEXT_EA(ea)) {
if (can_list(ea)) { if (can_list(ea)) {
int namelen = copy_name(buffer, ea); int namelen = copy_name(buffer, ea);
buffer += namelen + 1; buffer += namelen + 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册