afs/fs/cachefs recycling.c,1.29,1.30
dwh at infradead.org
dwh at infradead.org
Fri Jul 18 10:53:57 BST 2003
- Previous message: afs/fs/cachefs vjournal.c,1.4,1.5 rootdir.c,1.15,1.16
recycling.c,1.28,1.29 journal.c,1.40,1.41 index.c,1.28,1.29
dump-journal.c,1.14,1.15 cachefs-layout.h,1.31,1.32aops.c,1.43,1.44
- Next message: afs/fs/cachefs replay.c,1.2,1.3 journal.c,1.41,1.42
dump-journal.c,1.15,1.16 cachefs-layout.h,1.32,1.33cachefs-int.h,1.39,1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/afs/fs/cachefs
In directory phoenix.infradead.org:/tmp/cvs-serv18640/fs/cachefs
Modified Files:
recycling.c
Log Message:
don't want reclaimed block to end up being a new recycling node _and_ also its
first dependent child
Index: recycling.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/recycling.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- recycling.c 17 Jul 2003 12:02:13 -0000 1.29
+++ recycling.c 18 Jul 2003 08:53:54 -0000 1.30
@@ -32,11 +32,9 @@
*/
static int cachefs_recycle_begin_new_node(struct cachefs_super *super,
cachefs_blockix_t bix,
- cachefs_blockix_t upblock,
- unsigned short upentry)
+ struct cachefs_transaction *trans)
{
struct cachefs_ondisc_free_node *node;
- struct cachefs_transaction *trans;
struct cachefs_block *block;
struct page *page;
char used_unready_node = 0;
@@ -64,10 +62,12 @@
}
/* journal what we're going to do */
- ret = -ENOMEM;
- trans = cachefs_trans_alloc(super, GFP_KERNEL);
- if (!trans)
- goto error_rel_block;
+ if (!trans) {
+ ret = -ENOMEM;
+ trans = cachefs_trans_alloc(super, GFP_KERNEL);
+ if (!trans)
+ goto error_rel_block;
+ }
cachefs_trans_affects_block(trans, block, 0, PAGE_SIZE);
@@ -81,8 +81,6 @@
trans->jentry->index = super->recycle_cur;
trans->jentry->ixentry = super->recycle_cur_n;
trans->jentry->block = bix;
- trans->jentry->upblock = upblock;
- trans->jentry->upentry = upentry;
trans->jentry->pgnum =
super->layout->bix_unready + used_unready_node;
@@ -90,11 +88,6 @@
trans->changed |= CACHEFS_TRANS_CHANGED_RECYCLE;
trans->jentry->recycle_cur = bix;
- if (upblock) {
- trans->changed |= CACHEFS_TRANS_CHANGED_RCMPTR;
- trans->jentry->rcm_ptrnext = upentry;
- }
-
/* mark the beginning of the operation */
ret = cachefs_trans_mark(trans);
if (ret<0)
@@ -150,7 +143,7 @@
* consume the next unready block to set up a new one
*/
if (super->recycle_room == 0)
- cachefs_recycle_begin_new_node(super, 0, 0, 0);
+ cachefs_recycle_begin_new_node(super, 0, NULL);
qty = super->layout->bix_end - super->layout->bix_unready;
if (qty == 0) {
@@ -394,14 +387,19 @@
goto out;
found:
- /* make sure there's a recycling block with space available */
+ trans = *_trans;
+
+ /* make sure there's a recycling node with space available */
if (super->recycle_room == 0) {
+ trans->jentry->upblock = super->rcm_block;
+ trans->jentry->upentry = src;
+ trans->jentry->rcm_ptrnext = src + 1;
+
ret = cachefs_recycle_begin_new_node(super, indirect[src],
- super->rcm_block, src);
+ trans);
+ *_trans = NULL;
goto out;
}
-
- trans = *_trans;
cachefs_trans_affects_block(trans, super->recycle_block, 0, PAGE_SIZE);
- Previous message: afs/fs/cachefs vjournal.c,1.4,1.5 rootdir.c,1.15,1.16
recycling.c,1.28,1.29 journal.c,1.40,1.41 index.c,1.28,1.29
dump-journal.c,1.14,1.15 cachefs-layout.h,1.31,1.32aops.c,1.43,1.44
- Next message: afs/fs/cachefs replay.c,1.2,1.3 journal.c,1.41,1.42
dump-journal.c,1.15,1.16 cachefs-layout.h,1.32,1.33cachefs-int.h,1.39,1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the linux-afs-cvs
mailing list