Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1594698 > unrolled thread
| Started by | Jaegeuk Kim <jaegeuk@kernel.org> |
|---|---|
| First post | 2017-03-07 23:30 +0100 |
| Last post | 2017-03-09 11:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 4/4] f2fs: use __set{__claer}_bit_le Jaegeuk Kim <jaegeuk@kernel.org> - 2017-03-07 23:30 +0100
Re: [PATCH 4/4] f2fs: use __set{__claer}_bit_le Chao Yu <yuchao0@huawei.com> - 2017-03-09 11:50 +0100
| From | Jaegeuk Kim <jaegeuk@kernel.org> |
|---|---|
| Date | 2017-03-07 23:30 +0100 |
| Subject | [PATCH 4/4] f2fs: use __set{__claer}_bit_le |
| Message-ID | <tivMd-5FM-3@gated-at.bofh.it> |
This patch uses __set{__clear}_bit_le for highter speed.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/dir.c | 2 +-
fs/f2fs/node.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 4650c9b85de7..8d5c62b07b28 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -750,7 +750,7 @@ void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct page *page,
dentry_blk = page_address(page);
bit_pos = dentry - dentry_blk->dentry;
for (i = 0; i < slots; i++)
- clear_bit_le(bit_pos + i, &dentry_blk->dentry_bitmap);
+ __clear_bit_le(bit_pos + i, &dentry_blk->dentry_bitmap);
/* Let's check and deallocate this dentry page */
bit_pos = find_next_bit_le(&dentry_blk->dentry_bitmap,
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 342742754a09..3377a512e299 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1825,9 +1825,9 @@ void update_free_nid_bitmap(struct f2fs_sb_info *sbi, nid_t nid,
return;
if (set)
- set_bit_le(nid_ofs, nm_i->free_nid_bitmap[nat_ofs]);
+ __set_bit_le(nid_ofs, nm_i->free_nid_bitmap[nat_ofs]);
else
- clear_bit_le(nid_ofs, nm_i->free_nid_bitmap[nat_ofs]);
+ __clear_bit_le(nid_ofs, nm_i->free_nid_bitmap[nat_ofs]);
spin_lock(&nm_i->free_nid_lock);
if (set)
@@ -1849,7 +1849,7 @@ static void scan_nat_page(struct f2fs_sb_info *sbi,
if (test_bit_le(nat_ofs, nm_i->nat_block_bitmap))
return;
- set_bit_le(nat_ofs, nm_i->nat_block_bitmap);
+ __set_bit_le(nat_ofs, nm_i->nat_block_bitmap);
i = start_nid % NAT_ENTRY_PER_BLOCK;
@@ -2339,16 +2339,16 @@ void __update_nat_bits(struct f2fs_sb_info *sbi, nid_t start_nid,
valid++;
}
if (valid == 0) {
- set_bit_le(nat_index, nm_i->empty_nat_bits);
- clear_bit_le(nat_index, nm_i->full_nat_bits);
+ __set_bit_le(nat_index, nm_i->empty_nat_bits);
+ __clear_bit_le(nat_index, nm_i->full_nat_bits);
return;
}
- clear_bit_le(nat_index, nm_i->empty_nat_bits);
+ __clear_bit_le(nat_index, nm_i->empty_nat_bits);
if (valid == NAT_ENTRY_PER_BLOCK)
- set_bit_le(nat_index, nm_i->full_nat_bits);
+ __set_bit_le(nat_index, nm_i->full_nat_bits);
else
- clear_bit_le(nat_index, nm_i->full_nat_bits);
+ __clear_bit_le(nat_index, nm_i->full_nat_bits);
}
static void __flush_nat_entry_set(struct f2fs_sb_info *sbi,
--
2.11.0
[toc] | [next] | [standalone]
| From | Chao Yu <yuchao0@huawei.com> |
|---|---|
| Date | 2017-03-09 11:50 +0100 |
| Message-ID | <tj3NT-3XL-9@gated-at.bofh.it> |
| In reply to | #1594698 |
On 2017/3/8 6:13, Jaegeuk Kim wrote:
> This patch uses __set{__clear}_bit_le for highter speed.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web