Merge head 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6

+34 -24
+4
fs/jfs/inode.c
··· 128 { 129 jfs_info("In jfs_delete_inode, inode = 0x%p", inode); 130 131 if (test_cflag(COMMIT_Freewmap, inode)) 132 jfs_free_zero_link(inode); 133
··· 128 { 129 jfs_info("In jfs_delete_inode, inode = 0x%p", inode); 130 131 + if (is_bad_inode(inode) || 132 + (JFS_IP(inode)->fileset != cpu_to_le32(FILESYSTEM_I))) 133 + return; 134 + 135 if (test_cflag(COMMIT_Freewmap, inode)) 136 jfs_free_zero_link(inode); 137
+19 -17
fs/jfs/jfs_logmgr.c
··· 191 static bio_end_io_t lbmIODone; 192 static void lbmStartIO(struct lbuf * bp); 193 static void lmGCwrite(struct jfs_log * log, int cant_block); 194 - static int lmLogSync(struct jfs_log * log, int nosyncwait); 195 196 197 ··· 915 * if new sync address is available 916 * (normally the case if sync() is executed by back-ground 917 * process). 918 - * if not, explicitly run jfs_blogsync() to initiate 919 - * getting of new sync address. 920 * calculate new value of i_nextsync which determines when 921 * this code is called again. 922 * 923 * PARAMETERS: log - log structure 924 - * nosyncwait - 1 if called asynchronously 925 * 926 * RETURN: 0 927 * 928 * serialization: LOG_LOCK() held on entry/exit 929 */ 930 - static int lmLogSync(struct jfs_log * log, int nosyncwait) 931 { 932 int logsize; 933 int written; /* written since last syncpt */ ··· 939 unsigned long flags; 940 941 /* push dirty metapages out to disk */ 942 - list_for_each_entry(sbi, &log->sb_list, log_list) { 943 - filemap_flush(sbi->ipbmap->i_mapping); 944 - filemap_flush(sbi->ipimap->i_mapping); 945 - filemap_flush(sbi->direct_inode->i_mapping); 946 - } 947 948 /* 949 * forward syncpt ··· 1026 /* next syncpt trigger = written + more */ 1027 log->nextsync = written + more; 1028 1029 - /* return if lmLogSync() from outside of transaction, e.g., sync() */ 1030 - if (nosyncwait) 1031 - return lsn; 1032 - 1033 /* if number of bytes written from last sync point is more 1034 * than 1/4 of the log size, stop new transactions from 1035 * starting until all current transactions are completed ··· 1050 * 1051 * FUNCTION: write log SYNCPT record for specified log 1052 * 1053 - * PARAMETERS: log - log structure 1054 */ 1055 - void jfs_syncpt(struct jfs_log *log) 1056 { LOG_LOCK(log); 1057 - lmLogSync(log, 1); 1058 LOG_UNLOCK(log); 1059 } 1060
··· 191 static bio_end_io_t lbmIODone; 192 static void lbmStartIO(struct lbuf * bp); 193 static void lmGCwrite(struct jfs_log * log, int cant_block); 194 + static int lmLogSync(struct jfs_log * log, int hard_sync); 195 196 197 ··· 915 * if new sync address is available 916 * (normally the case if sync() is executed by back-ground 917 * process). 918 * calculate new value of i_nextsync which determines when 919 * this code is called again. 920 * 921 * PARAMETERS: log - log structure 922 + * hard_sync - 1 to force all metadata to be written 923 * 924 * RETURN: 0 925 * 926 * serialization: LOG_LOCK() held on entry/exit 927 */ 928 + static int lmLogSync(struct jfs_log * log, int hard_sync) 929 { 930 int logsize; 931 int written; /* written since last syncpt */ ··· 941 unsigned long flags; 942 943 /* push dirty metapages out to disk */ 944 + if (hard_sync) 945 + list_for_each_entry(sbi, &log->sb_list, log_list) { 946 + filemap_fdatawrite(sbi->ipbmap->i_mapping); 947 + filemap_fdatawrite(sbi->ipimap->i_mapping); 948 + filemap_fdatawrite(sbi->direct_inode->i_mapping); 949 + } 950 + else 951 + list_for_each_entry(sbi, &log->sb_list, log_list) { 952 + filemap_flush(sbi->ipbmap->i_mapping); 953 + filemap_flush(sbi->ipimap->i_mapping); 954 + filemap_flush(sbi->direct_inode->i_mapping); 955 + } 956 957 /* 958 * forward syncpt ··· 1021 /* next syncpt trigger = written + more */ 1022 log->nextsync = written + more; 1023 1024 /* if number of bytes written from last sync point is more 1025 * than 1/4 of the log size, stop new transactions from 1026 * starting until all current transactions are completed ··· 1049 * 1050 * FUNCTION: write log SYNCPT record for specified log 1051 * 1052 + * PARAMETERS: log - log structure 1053 + * hard_sync - set to 1 to force metadata to be written 1054 */ 1055 + void jfs_syncpt(struct jfs_log *log, int hard_sync) 1056 { LOG_LOCK(log); 1057 + lmLogSync(log, hard_sync); 1058 LOG_UNLOCK(log); 1059 } 1060
+1 -1
fs/jfs/jfs_logmgr.h
··· 510 extern int lmGroupCommit(struct jfs_log *, struct tblock *); 511 extern int jfsIOWait(void *); 512 extern void jfs_flush_journal(struct jfs_log * log, int wait); 513 - extern void jfs_syncpt(struct jfs_log *log); 514 515 #endif /* _H_JFS_LOGMGR */
··· 510 extern int lmGroupCommit(struct jfs_log *, struct tblock *); 511 extern int jfsIOWait(void *); 512 extern void jfs_flush_journal(struct jfs_log * log, int wait); 513 + extern void jfs_syncpt(struct jfs_log *log, int hard_sync); 514 515 #endif /* _H_JFS_LOGMGR */
+7 -5
fs/jfs/jfs_txnmgr.c
··· 552 * synchronize with logsync barrier 553 */ 554 if (test_bit(log_SYNCBARRIER, &log->flag)) { 555 jfs_info("log barrier off: 0x%x", log->lsn); 556 557 /* enable new transactions start */ ··· 564 565 /* wakeup all waitors for logsync barrier */ 566 TXN_WAKEUP(&log->syncwait); 567 - 568 - TXN_UNLOCK(); 569 - 570 - /* forward log syncpt */ 571 - jfs_syncpt(log); 572 573 goto wakeup; 574 } ··· 657 /* only anonymous txn. 658 * Remove from anon_list 659 */ 660 list_del_init(&jfs_ip->anon_inode_list); 661 } 662 jfs_ip->atlhead = tlck->next; 663 } else {
··· 552 * synchronize with logsync barrier 553 */ 554 if (test_bit(log_SYNCBARRIER, &log->flag)) { 555 + TXN_UNLOCK(); 556 + 557 + /* write dirty metadata & forward log syncpt */ 558 + jfs_syncpt(log, 1); 559 + 560 jfs_info("log barrier off: 0x%x", log->lsn); 561 562 /* enable new transactions start */ ··· 559 560 /* wakeup all waitors for logsync barrier */ 561 TXN_WAKEUP(&log->syncwait); 562 563 goto wakeup; 564 } ··· 657 /* only anonymous txn. 658 * Remove from anon_list 659 */ 660 + TXN_LOCK(); 661 list_del_init(&jfs_ip->anon_inode_list); 662 + TXN_UNLOCK(); 663 } 664 jfs_ip->atlhead = tlck->next; 665 } else {
+3 -1
fs/jfs/super.c
··· 114 { 115 struct jfs_inode_info *ji = JFS_IP(inode); 116 117 spin_lock_irq(&ji->ag_lock); 118 if (ji->active_ag != -1) { 119 struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; ··· 533 /* log == NULL indicates read-only mount */ 534 if (log) { 535 jfs_flush_journal(log, wait); 536 - jfs_syncpt(log); 537 } 538 539 return 0;
··· 114 { 115 struct jfs_inode_info *ji = JFS_IP(inode); 116 117 + BUG_ON(!list_empty(&ji->anon_inode_list)); 118 + 119 spin_lock_irq(&ji->ag_lock); 120 if (ji->active_ag != -1) { 121 struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; ··· 531 /* log == NULL indicates read-only mount */ 532 if (log) { 533 jfs_flush_journal(log, wait); 534 + jfs_syncpt(log, 0); 535 } 536 537 return 0;