Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195811
b: refs/heads/master
c: 48389ef
h: refs/heads/master
i:
  195809: d3f525e
  195807: 04337f3
v: v3
  • Loading branch information
Alex Elder committed May 19, 2010
1 parent f850711 commit dbb35d4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69ce58f08a3c455ff74cfcde90e9ab267d67f636
refs/heads/master: 48389ef17583f2214bbd2c119b3015677419c16b
1 change: 0 additions & 1 deletion trunk/fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,6 @@ xlog_alloc_log(xfs_mount_t *mp,
}
}
log->l_sectBBsize = 1 << log2_size;
log->l_sectbb_mask = log->l_sectBBsize - 1;

xlog_get_iclog_buffer_size(mp, log);

Expand Down
4 changes: 1 addition & 3 deletions trunk/fs/xfs/xfs_log_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,7 @@ typedef struct log {
struct xfs_buf_cancel **l_buf_cancel_table;
int l_iclog_hsize; /* size of iclog header */
int l_iclog_heads; /* # of iclog header sectors */
uint l_sectBBsize; /* sector size in BBs */
uint l_sectbb_mask; /* sector size (in BBs)
* alignment mask */
uint l_sectBBsize; /* sector size in BBs (2^n) */
int l_iclog_size; /* size of log in bytes */
int l_iclog_size_log; /* log power size of log */
int l_iclog_bufs; /* number of iclog buffers */
Expand Down
14 changes: 9 additions & 5 deletions trunk/fs/xfs/xfs_log_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,25 @@ xlog_put_bp(
xfs_buf_free(bp);
}

/*
* Return the address of the start of the given block number's data
* in a log buffer. The buffer covers a log sector-aligned region.
*/
STATIC xfs_caddr_t
xlog_align(
xlog_t *log,
xfs_daddr_t blk_no,
int nbblks,
xfs_buf_t *bp)
{
xfs_daddr_t offset;
xfs_caddr_t ptr;

if (log->l_sectBBsize == 1)
return XFS_BUF_PTR(bp);
offset = blk_no & ((xfs_daddr_t) log->l_sectBBsize - 1);
ptr = XFS_BUF_PTR(bp) + BBTOB(offset);

ASSERT(ptr + BBTOB(nbblks) <= XFS_BUF_PTR(bp) + XFS_BUF_SIZE(bp));

ptr = XFS_BUF_PTR(bp) + BBTOB((int)blk_no & log->l_sectbb_mask);
ASSERT(XFS_BUF_SIZE(bp) >=
BBTOB(nbblks + (blk_no & log->l_sectbb_mask)));
return ptr;
}

Expand Down

0 comments on commit dbb35d4

Please sign in to comment.