Skip to content
Snippets Groups Projects
Commit 45aa1880 authored by Andreas Dilger's avatar Andreas Dilger
Browse files

Correct number of journal credits calculated for FSFILT_OP_CANCEL_UNLINK_LOG

so that we don't have transaction errors on small MDS filesystems.
b=2931
r=tianying
parent 353bf02f
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ tbd Cluster File Systems, Inc. <info@clusterfs.com> ...@@ -12,6 +12,7 @@ tbd Cluster File Systems, Inc. <info@clusterfs.com>
- bump LLOG_CHUNKSIZE to 8k to allow for larger clusters (2306) - bump LLOG_CHUNKSIZE to 8k to allow for larger clusters (2306)
- fix race in target_handle_connect (2898) - fix race in target_handle_connect (2898)
- mds_reint_create() should take same inode create lock (2926) - mds_reint_create() should take same inode create lock (2926)
- correct journal credits calculated for CANCEL_UNLINK_LOG (2931)
2004-03-04 Cluster File Systems, Inc. <info@clusterfs.com> 2004-03-04 Cluster File Systems, Inc. <info@clusterfs.com>
* version 1.2.0 * version 1.2.0
......
...@@ -74,11 +74,11 @@ static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private) ...@@ -74,11 +74,11 @@ static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private)
{ {
/* For updates to the last recieved file */ /* For updates to the last recieved file */
int nblocks = EXT3_DATA_TRANS_BLOCKS; int nblocks = EXT3_DATA_TRANS_BLOCKS;
int blocksize, block_count = 0;
void *handle; void *handle;
if (current->journal_info) { if (current->journal_info) {
CDEBUG(D_INODE, "increasing refcount on %p\n", current->journal_info); CDEBUG(D_INODE, "increasing refcount on %p\n",
current->journal_info);
goto journal_start; goto journal_start;
} }
...@@ -121,11 +121,8 @@ static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private) ...@@ -121,11 +121,8 @@ static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private)
nblocks += 1; nblocks += 1;
break; break;
case FSFILT_OP_CANCEL_UNLINK_LOG: case FSFILT_OP_CANCEL_UNLINK_LOG:
blocksize = 1 << inode->i_blkbits; nblocks = (LLOG_CHUNK_SIZE >> inode->i_blkbits) +
block_count = (blocksize - 1) + LLOG_CHUNK_SIZE; EXT3_DELETE_TRANS_BLOCKS;
block_count = (block_count + blocksize - 1) >> inode->i_blkbits;
block_count = block_count * EXT3_DATA_TRANS_BLOCKS + 2;
nblocks = 2 * 2 * block_count;
break; break;
default: CERROR("unknown transaction start op %d\n", op); default: CERROR("unknown transaction start op %d\n", op);
LBUG(); LBUG();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment