aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-12-06 16:58:09 -0500
committerBen Myers <bpm@sgi.com>2011-12-08 14:53:30 -0500
commitb39342134a6ec72778ffc2ddbd3c0faa10c64676 (patch)
treefc95ebf3b6ef32c80b907d7ea9af6112b4e520ff
parent0244b9603df38bf19155b761689e1a816fc50b0a (diff)
xfs: remove the lid_size field in struct log_item_desc
Outside the now removed nodelaylog code this field is only used for asserts and can be safely removed now. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
-rw-r--r--fs/xfs/xfs_dquot_item.c1
-rw-r--r--fs/xfs/xfs_inode_item.c2
-rw-r--r--fs/xfs/xfs_log_cil.c9
-rw-r--r--fs/xfs/xfs_trans.c1
-rw-r--r--fs/xfs/xfs_trans.h3
5 files changed, 6 insertions, 10 deletions
diff --git a/fs/xfs/xfs_dquot_item.c b/fs/xfs/xfs_dquot_item.c
index 0dee0b71029d..79da711e5dd2 100644
--- a/fs/xfs/xfs_dquot_item.c
+++ b/fs/xfs/xfs_dquot_item.c
@@ -73,7 +73,6 @@ xfs_qm_dquot_logitem_format(
73 logvec->i_len = sizeof(xfs_disk_dquot_t); 73 logvec->i_len = sizeof(xfs_disk_dquot_t);
74 logvec->i_type = XLOG_REG_TYPE_DQUOT; 74 logvec->i_type = XLOG_REG_TYPE_DQUOT;
75 75
76 ASSERT(2 == lip->li_desc->lid_size);
77 qlip->qli_format.qlf_size = 2; 76 qlip->qli_format.qlf_size = 2;
78 77
79} 78}
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
index abaafdbb3e65..cfd6c7f8cc3c 100644
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -437,7 +437,6 @@ xfs_inode_item_format(
437 * Assert that no attribute-related log flags are set. 437 * Assert that no attribute-related log flags are set.
438 */ 438 */
439 if (!XFS_IFORK_Q(ip)) { 439 if (!XFS_IFORK_Q(ip)) {
440 ASSERT(nvecs == lip->li_desc->lid_size);
441 iip->ili_format.ilf_size = nvecs; 440 iip->ili_format.ilf_size = nvecs;
442 ASSERT(!(iip->ili_format.ilf_fields & 441 ASSERT(!(iip->ili_format.ilf_fields &
443 (XFS_ILOG_ADATA | XFS_ILOG_ABROOT | XFS_ILOG_AEXT))); 442 (XFS_ILOG_ADATA | XFS_ILOG_ABROOT | XFS_ILOG_AEXT)));
@@ -521,7 +520,6 @@ xfs_inode_item_format(
521 break; 520 break;
522 } 521 }
523 522
524 ASSERT(nvecs == lip->li_desc->lid_size);
525 iip->ili_format.ilf_size = nvecs; 523 iip->ili_format.ilf_size = nvecs;
526} 524}
527 525
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c
index 68812d3ab14d..26db6b13f1f9 100644
--- a/fs/xfs/xfs_log_cil.c
+++ b/fs/xfs/xfs_log_cil.c
@@ -179,23 +179,24 @@ xlog_cil_prepare_log_vecs(
179 void *ptr; 179 void *ptr;
180 int index; 180 int index;
181 int len = 0; 181 int len = 0;
182 uint niovecs;
182 183
183 /* Skip items which aren't dirty in this transaction. */ 184 /* Skip items which aren't dirty in this transaction. */
184 if (!(lidp->lid_flags & XFS_LID_DIRTY)) 185 if (!(lidp->lid_flags & XFS_LID_DIRTY))
185 continue; 186 continue;
186 187
187 /* Skip items that do not have any vectors for writing */ 188 /* Skip items that do not have any vectors for writing */
188 lidp->lid_size = IOP_SIZE(lidp->lid_item); 189 niovecs = IOP_SIZE(lidp->lid_item);
189 if (!lidp->lid_size) 190 if (!niovecs)
190 continue; 191 continue;
191 192
192 new_lv = kmem_zalloc(sizeof(*new_lv) + 193 new_lv = kmem_zalloc(sizeof(*new_lv) +
193 lidp->lid_size * sizeof(struct xfs_log_iovec), 194 niovecs * sizeof(struct xfs_log_iovec),
194 KM_SLEEP); 195 KM_SLEEP);
195 196
196 /* The allocated iovec region lies beyond the log vector. */ 197 /* The allocated iovec region lies beyond the log vector. */
197 new_lv->lv_iovecp = (struct xfs_log_iovec *)&new_lv[1]; 198 new_lv->lv_iovecp = (struct xfs_log_iovec *)&new_lv[1];
198 new_lv->lv_niovecs = lidp->lid_size; 199 new_lv->lv_niovecs = niovecs;
199 new_lv->lv_item = lidp->lid_item; 200 new_lv->lv_item = lidp->lid_item;
200 201
201 /* build the vector array and calculate it's length */ 202 /* build the vector array and calculate it's length */
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index 6170f1c2dfd8..329b06aba1c2 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -1158,7 +1158,6 @@ xfs_trans_add_item(
1158 1158
1159 lidp->lid_item = lip; 1159 lidp->lid_item = lip;
1160 lidp->lid_flags = 0; 1160 lidp->lid_flags = 0;
1161 lidp->lid_size = 0;
1162 list_add_tail(&lidp->lid_trans, &tp->t_items); 1161 list_add_tail(&lidp->lid_trans, &tp->t_items);
1163 1162
1164 lip->li_desc = lidp; 1163 lip->li_desc = lidp;
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index 3ae713c0abd9..f6118703f20d 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -163,9 +163,8 @@ typedef struct xfs_trans_header {
163 */ 163 */
164struct xfs_log_item_desc { 164struct xfs_log_item_desc {
165 struct xfs_log_item *lid_item; 165 struct xfs_log_item *lid_item;
166 ushort lid_size;
167 unsigned char lid_flags;
168 struct list_head lid_trans; 166 struct list_head lid_trans;
167 unsigned char lid_flags;
169}; 168};
170 169
171#define XFS_LID_DIRTY 0x1 170#define XFS_LID_DIRTY 0x1