aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-11-10 08:50:03 -0500
committerDave Kleikamp <shaggy@austin.ibm.com>2005-11-10 08:50:03 -0500
commitdd8a306ac0c918268bd2ae89da2dea627f6e352d (patch)
treee3f2c244505931d93b09f7d314014cf3832b0176 /fs
parent3b44f137b9a846c5452d9e6e1271b79b1dbcc942 (diff)
JFS: Add back directory i_size calculations for legacy partitions
Linux-formatted jfs partitions have a different idea about what i_size represents than partitions formatted on OS/2. The i_size calculation is now based on the size of the directory index. For legacy partitions, which have no directory index, the i_size is never being updated. This patch adds back the original i_size calculations for legacy partitions. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/jfs/jfs_dtree.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c
index 404f33eae507..6c3f08319846 100644
--- a/fs/jfs/jfs_dtree.c
+++ b/fs/jfs/jfs_dtree.c
@@ -1005,6 +1005,9 @@ static int dtSplitUp(tid_t tid,
1005 1005
1006 DT_PUTPAGE(smp); 1006 DT_PUTPAGE(smp);
1007 1007
1008 if (!DO_INDEX(ip))
1009 ip->i_size = xlen << sbi->l2bsize;
1010
1008 goto freeKeyName; 1011 goto freeKeyName;
1009 } 1012 }
1010 1013
@@ -1055,7 +1058,9 @@ static int dtSplitUp(tid_t tid,
1055 xaddr = addressPXD(pxd) + xlen; 1058 xaddr = addressPXD(pxd) + xlen;
1056 dbFree(ip, xaddr, (s64) n); 1059 dbFree(ip, xaddr, (s64) n);
1057 } 1060 }
1058 } 1061 } else if (!DO_INDEX(ip))
1062 ip->i_size = lengthPXD(pxd) << sbi->l2bsize;
1063
1059 1064
1060 extendOut: 1065 extendOut:
1061 DT_PUTPAGE(smp); 1066 DT_PUTPAGE(smp);
@@ -1098,6 +1103,9 @@ static int dtSplitUp(tid_t tid,
1098 goto splitOut; 1103 goto splitOut;
1099 } 1104 }
1100 1105
1106 if (!DO_INDEX(ip))
1107 ip->i_size += PSIZE;
1108
1101 /* 1109 /*
1102 * propagate up the router entry for the leaf page just split 1110 * propagate up the router entry for the leaf page just split
1103 * 1111 *
@@ -2424,6 +2432,9 @@ static int dtDeleteUp(tid_t tid, struct inode *ip,
2424 break; 2432 break;
2425 } 2433 }
2426 2434
2435 if (!DO_INDEX(ip))
2436 ip->i_size -= PSIZE;
2437
2427 return 0; 2438 return 0;
2428} 2439}
2429 2440