xfs
[Top] [All Lists]

transaction vec. length

To: linux-xfs@xxxxxxxxxxx
Subject: transaction vec. length
From: ASANO Masahiro <masano@xxxxxxxxxxxxxx>
Date: Mon, 28 Oct 2002 18:39:59 +0900 (JST)
Sender: linux-xfs-bounce@xxxxxxxxxxx
Hi,

I'm inspecting transaction code now.
At some minor case, the log size seems possibly become larger than
what it means. I think it need to reset the `nbits' variable in
following code (xfs_buf_item_format).

--
Masano

--- linux/fs/xfs/xfs_buf_item.c Thu Oct 24 07:46:16 2002
+++ linux/fs/xfs/xfs_buf_item.c.new     Mon Oct 28 17:42:54 2002
@@ -319,30 +319,31 @@
                        nbits = 1;
                } else if (xfs_buf_offset(bp, next_bit << XFS_BLI_SHIFT) !=
                           (xfs_buf_offset(bp, last_bit << XFS_BLI_SHIFT) +
                            XFS_BLI_CHUNK)) {
                        buffer_offset = first_bit * XFS_BLI_CHUNK;
                        vecp->i_addr = xfs_buf_offset(bp, buffer_offset);
                        vecp->i_len = nbits * XFS_BLI_CHUNK;
 /* You would think we need to bump the nvecs here too, but we do not
  * this number is used by recovery, and it gets confused by the boundary
  * split here
  *                     nvecs++;
  */
                        vecp++;
                        first_bit = next_bit;
                        last_bit = next_bit;
+                       nbits = 1;
                } else {
                        last_bit++;
                        nbits++;
                }
        }
        bip->bli_format.blf_size = nvecs;
 
        /*
         * Check to make sure everything is consistent.
         */
        xfs_buf_item_trace("FORMAT NORM", bip);
        xfs_buf_item_log_check(bip);
 }
 
 /*


<Prev in Thread] Current Thread [Next in Thread>