jfs_txnmgr.c (185a257f2f73bcd89050ad02da5bedbc28fc43fa) | jfs_txnmgr.c (4d81715fc5dfa1680ad47d7edf3ac4a74c5bf104) |
---|---|
1/* 2 * Copyright (C) International Business Machines Corp., 2000-2005 3 * Portions Copyright (C) Christoph Hellwig, 2001-2002 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 2379 unchanged lines hidden (view full) --- 2388 * 2389 * update allocation state in pmap and 2390 * update lsn of the pmap page; 2391 * update in-memory inode flag/state 2392 * 2393 * unlock mapper/write lock 2394 */ 2395 if (tblk->xflag & COMMIT_CREATE) { | 1/* 2 * Copyright (C) International Business Machines Corp., 2000-2005 3 * Portions Copyright (C) Christoph Hellwig, 2001-2002 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 2379 unchanged lines hidden (view full) --- 2388 * 2389 * update allocation state in pmap and 2390 * update lsn of the pmap page; 2391 * update in-memory inode flag/state 2392 * 2393 * unlock mapper/write lock 2394 */ 2395 if (tblk->xflag & COMMIT_CREATE) { |
2396 diUpdatePMap(ipimap, tblk->ino, FALSE, tblk); | 2396 diUpdatePMap(ipimap, tblk->ino, false, tblk); |
2397 /* update persistent block allocation map 2398 * for the allocation of inode extent; 2399 */ 2400 pxdlock.flag = mlckALLOCPXD; 2401 pxdlock.pxd = tblk->u.ixpxd; 2402 pxdlock.index = 1; 2403 txAllocPMap(ipimap, (struct maplock *) & pxdlock, tblk); 2404 } else if (tblk->xflag & COMMIT_DELETE) { 2405 ip = tblk->u.ip; | 2397 /* update persistent block allocation map 2398 * for the allocation of inode extent; 2399 */ 2400 pxdlock.flag = mlckALLOCPXD; 2401 pxdlock.pxd = tblk->u.ixpxd; 2402 pxdlock.index = 1; 2403 txAllocPMap(ipimap, (struct maplock *) & pxdlock, tblk); 2404 } else if (tblk->xflag & COMMIT_DELETE) { 2405 ip = tblk->u.ip; |
2406 diUpdatePMap(ipimap, ip->i_ino, TRUE, tblk); | 2406 diUpdatePMap(ipimap, ip->i_ino, true, tblk); |
2407 iput(ip); 2408 } 2409} 2410 2411/* 2412 * txAllocPMap() 2413 * 2414 * function: allocate from persistent map; --- 31 unchanged lines hidden (view full) --- 2446 */ 2447 if (maplock->flag & mlckALLOCXADLIST) { 2448 xadlistlock = (struct xdlistlock *) maplock; 2449 xad = xadlistlock->xdlist; 2450 for (n = 0; n < xadlistlock->count; n++, xad++) { 2451 if (xad->flag & (XAD_NEW | XAD_EXTENDED)) { 2452 xaddr = addressXAD(xad); 2453 xlen = lengthXAD(xad); | 2407 iput(ip); 2408 } 2409} 2410 2411/* 2412 * txAllocPMap() 2413 * 2414 * function: allocate from persistent map; --- 31 unchanged lines hidden (view full) --- 2446 */ 2447 if (maplock->flag & mlckALLOCXADLIST) { 2448 xadlistlock = (struct xdlistlock *) maplock; 2449 xad = xadlistlock->xdlist; 2450 for (n = 0; n < xadlistlock->count; n++, xad++) { 2451 if (xad->flag & (XAD_NEW | XAD_EXTENDED)) { 2452 xaddr = addressXAD(xad); 2453 xlen = lengthXAD(xad); |
2454 dbUpdatePMap(ipbmap, FALSE, xaddr, | 2454 dbUpdatePMap(ipbmap, false, xaddr, |
2455 (s64) xlen, tblk); 2456 xad->flag &= ~(XAD_NEW | XAD_EXTENDED); 2457 jfs_info("allocPMap: xaddr:0x%lx xlen:%d", 2458 (ulong) xaddr, xlen); 2459 } 2460 } 2461 } else if (maplock->flag & mlckALLOCPXD) { 2462 pxdlock = (struct pxd_lock *) maplock; 2463 xaddr = addressPXD(&pxdlock->pxd); 2464 xlen = lengthPXD(&pxdlock->pxd); | 2455 (s64) xlen, tblk); 2456 xad->flag &= ~(XAD_NEW | XAD_EXTENDED); 2457 jfs_info("allocPMap: xaddr:0x%lx xlen:%d", 2458 (ulong) xaddr, xlen); 2459 } 2460 } 2461 } else if (maplock->flag & mlckALLOCPXD) { 2462 pxdlock = (struct pxd_lock *) maplock; 2463 xaddr = addressPXD(&pxdlock->pxd); 2464 xlen = lengthPXD(&pxdlock->pxd); |
2465 dbUpdatePMap(ipbmap, FALSE, xaddr, (s64) xlen, tblk); | 2465 dbUpdatePMap(ipbmap, false, xaddr, (s64) xlen, tblk); |
2466 jfs_info("allocPMap: xaddr:0x%lx xlen:%d", (ulong) xaddr, xlen); 2467 } else { /* (maplock->flag & mlckALLOCPXDLIST) */ 2468 2469 pxdlistlock = (struct xdlistlock *) maplock; 2470 pxd = pxdlistlock->xdlist; 2471 for (n = 0; n < pxdlistlock->count; n++, pxd++) { 2472 xaddr = addressPXD(pxd); 2473 xlen = lengthPXD(pxd); | 2466 jfs_info("allocPMap: xaddr:0x%lx xlen:%d", (ulong) xaddr, xlen); 2467 } else { /* (maplock->flag & mlckALLOCPXDLIST) */ 2468 2469 pxdlistlock = (struct xdlistlock *) maplock; 2470 pxd = pxdlistlock->xdlist; 2471 for (n = 0; n < pxdlistlock->count; n++, pxd++) { 2472 xaddr = addressPXD(pxd); 2473 xlen = lengthPXD(pxd); |
2474 dbUpdatePMap(ipbmap, FALSE, xaddr, (s64) xlen, | 2474 dbUpdatePMap(ipbmap, false, xaddr, (s64) xlen, |
2475 tblk); 2476 jfs_info("allocPMap: xaddr:0x%lx xlen:%d", 2477 (ulong) xaddr, xlen); 2478 } 2479 } 2480} 2481 2482/* --- 25 unchanged lines hidden (view full) --- 2508 if (maptype == COMMIT_PMAP || maptype == COMMIT_PWMAP) { 2509 if (maplock->flag & mlckFREEXADLIST) { 2510 xadlistlock = (struct xdlistlock *) maplock; 2511 xad = xadlistlock->xdlist; 2512 for (n = 0; n < xadlistlock->count; n++, xad++) { 2513 if (!(xad->flag & XAD_NEW)) { 2514 xaddr = addressXAD(xad); 2515 xlen = lengthXAD(xad); | 2475 tblk); 2476 jfs_info("allocPMap: xaddr:0x%lx xlen:%d", 2477 (ulong) xaddr, xlen); 2478 } 2479 } 2480} 2481 2482/* --- 25 unchanged lines hidden (view full) --- 2508 if (maptype == COMMIT_PMAP || maptype == COMMIT_PWMAP) { 2509 if (maplock->flag & mlckFREEXADLIST) { 2510 xadlistlock = (struct xdlistlock *) maplock; 2511 xad = xadlistlock->xdlist; 2512 for (n = 0; n < xadlistlock->count; n++, xad++) { 2513 if (!(xad->flag & XAD_NEW)) { 2514 xaddr = addressXAD(xad); 2515 xlen = lengthXAD(xad); |
2516 dbUpdatePMap(ipbmap, TRUE, xaddr, | 2516 dbUpdatePMap(ipbmap, true, xaddr, |
2517 (s64) xlen, tblk); 2518 jfs_info("freePMap: xaddr:0x%lx " 2519 "xlen:%d", 2520 (ulong) xaddr, xlen); 2521 } 2522 } 2523 } else if (maplock->flag & mlckFREEPXD) { 2524 pxdlock = (struct pxd_lock *) maplock; 2525 xaddr = addressPXD(&pxdlock->pxd); 2526 xlen = lengthPXD(&pxdlock->pxd); | 2517 (s64) xlen, tblk); 2518 jfs_info("freePMap: xaddr:0x%lx " 2519 "xlen:%d", 2520 (ulong) xaddr, xlen); 2521 } 2522 } 2523 } else if (maplock->flag & mlckFREEPXD) { 2524 pxdlock = (struct pxd_lock *) maplock; 2525 xaddr = addressPXD(&pxdlock->pxd); 2526 xlen = lengthPXD(&pxdlock->pxd); |
2527 dbUpdatePMap(ipbmap, TRUE, xaddr, (s64) xlen, | 2527 dbUpdatePMap(ipbmap, true, xaddr, (s64) xlen, |
2528 tblk); 2529 jfs_info("freePMap: xaddr:0x%lx xlen:%d", 2530 (ulong) xaddr, xlen); 2531 } else { /* (maplock->flag & mlckALLOCPXDLIST) */ 2532 2533 pxdlistlock = (struct xdlistlock *) maplock; 2534 pxd = pxdlistlock->xdlist; 2535 for (n = 0; n < pxdlistlock->count; n++, pxd++) { 2536 xaddr = addressPXD(pxd); 2537 xlen = lengthPXD(pxd); | 2528 tblk); 2529 jfs_info("freePMap: xaddr:0x%lx xlen:%d", 2530 (ulong) xaddr, xlen); 2531 } else { /* (maplock->flag & mlckALLOCPXDLIST) */ 2532 2533 pxdlistlock = (struct xdlistlock *) maplock; 2534 pxd = pxdlistlock->xdlist; 2535 for (n = 0; n < pxdlistlock->count; n++, pxd++) { 2536 xaddr = addressPXD(pxd); 2537 xlen = lengthPXD(pxd); |
2538 dbUpdatePMap(ipbmap, TRUE, xaddr, | 2538 dbUpdatePMap(ipbmap, true, xaddr, |
2539 (s64) xlen, tblk); 2540 jfs_info("freePMap: xaddr:0x%lx xlen:%d", 2541 (ulong) xaddr, xlen); 2542 } 2543 } 2544 } 2545 2546 /* --- 552 unchanged lines hidden --- | 2539 (s64) xlen, tblk); 2540 jfs_info("freePMap: xaddr:0x%lx xlen:%d", 2541 (ulong) xaddr, xlen); 2542 } 2543 } 2544 } 2545 2546 /* --- 552 unchanged lines hidden --- |