gc.c (b2efb3f0a1db62aff5e824125785ec6731143b6d) gc.c (a7ffdbe22cecaed59b5d76a5f003d68907d64240)
1/*
2 * fs/f2fs/gc.c
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 409 unchanged lines hidden (view full) ---

418 if (initial) {
419 ra_node_page(sbi, nid);
420 continue;
421 }
422 node_page = get_node_page(sbi, nid);
423 if (IS_ERR(node_page))
424 continue;
425
1/*
2 * fs/f2fs/gc.c
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 409 unchanged lines hidden (view full) ---

418 if (initial) {
419 ra_node_page(sbi, nid);
420 continue;
421 }
422 node_page = get_node_page(sbi, nid);
423 if (IS_ERR(node_page))
424 continue;
425
426 /* block may become invalid during get_node_page */
427 if (check_valid_map(sbi, segno, off) == 0) {
428 f2fs_put_page(node_page, 1);
429 continue;
430 }
431
426 /* set page dirty and write it */
427 if (gc_type == FG_GC) {
428 f2fs_wait_on_page_writeback(node_page, NODE);
429 set_page_dirty(node_page);
430 } else {
431 if (!PageWriteback(node_page))
432 set_page_dirty(node_page);
433 }

--- 92 unchanged lines hidden (view full) ---

526 if (PageWriteback(page))
527 goto out;
528 set_page_dirty(page);
529 set_cold_data(page);
530 } else {
531 f2fs_wait_on_page_writeback(page, DATA);
532
533 if (clear_page_dirty_for_io(page))
432 /* set page dirty and write it */
433 if (gc_type == FG_GC) {
434 f2fs_wait_on_page_writeback(node_page, NODE);
435 set_page_dirty(node_page);
436 } else {
437 if (!PageWriteback(node_page))
438 set_page_dirty(node_page);
439 }

--- 92 unchanged lines hidden (view full) ---

532 if (PageWriteback(page))
533 goto out;
534 set_page_dirty(page);
535 set_cold_data(page);
536 } else {
537 f2fs_wait_on_page_writeback(page, DATA);
538
539 if (clear_page_dirty_for_io(page))
534 inode_dec_dirty_dents(inode);
540 inode_dec_dirty_pages(inode);
535 set_cold_data(page);
536 do_write_data_page(page, &fio);
537 clear_cold_data(page);
538 }
539out:
540 f2fs_put_page(page, 1);
541}
542

--- 209 unchanged lines hidden ---
541 set_cold_data(page);
542 do_write_data_page(page, &fio);
543 clear_cold_data(page);
544 }
545out:
546 f2fs_put_page(page, 1);
547}
548

--- 209 unchanged lines hidden ---