node.h (d5432503bfb49f3425bad0b850714ffd8b533cfc) node.h (c6ac4c0ec416e77cab09cac6cee2d100fbd7fc82)
1/*
2 * fs/f2fs/node.h
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

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

187
188 return block_addr + nm_i->nat_blkaddr;
189}
190
191static inline void set_to_next_nat(struct f2fs_nm_info *nm_i, nid_t start_nid)
192{
193 unsigned int block_off = NAT_BLOCK_OFFSET(start_nid);
194
1/*
2 * fs/f2fs/node.h
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

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

187
188 return block_addr + nm_i->nat_blkaddr;
189}
190
191static inline void set_to_next_nat(struct f2fs_nm_info *nm_i, nid_t start_nid)
192{
193 unsigned int block_off = NAT_BLOCK_OFFSET(start_nid);
194
195 if (f2fs_test_bit(block_off, nm_i->nat_bitmap))
196 f2fs_clear_bit(block_off, nm_i->nat_bitmap);
197 else
198 f2fs_set_bit(block_off, nm_i->nat_bitmap);
195 f2fs_change_bit(block_off, nm_i->nat_bitmap);
199}
200
201static inline void fill_node_footer(struct page *page, nid_t nid,
202 nid_t ino, unsigned int ofs, bool reset)
203{
204 struct f2fs_node *rn = F2FS_NODE(page);
205 if (reset)
206 memset(rn, 0, sizeof(*rn));

--- 190 unchanged lines hidden ---
196}
197
198static inline void fill_node_footer(struct page *page, nid_t nid,
199 nid_t ino, unsigned int ofs, bool reset)
200{
201 struct f2fs_node *rn = F2FS_NODE(page);
202 if (reset)
203 memset(rn, 0, sizeof(*rn));

--- 190 unchanged lines hidden ---