Lines Matching +full:unlock +full:- +full:keys

1 // SPDX-License-Identifier: GPL-2.0
19 * tail. -ENOSPC if no disk space for conversion
29 struct super_block *sb = inode->i_sb; in direct2indirect()
48 BUG_ON(!th->t_trans_id); in direct2indirect()
50 REISERFS_SB(sb)->s_direct2indirect++; in direct2indirect()
52 blk_size = sb->s_blocksize; in direct2indirect()
67 reiserfs_error(sb, "PAP-14030", in direct2indirect()
71 return -EIO; in direct2indirect()
76 unfm_ptr = cpu_to_le32(unbh->b_blocknr); in direct2indirect()
96 * note: from here there are two keys which have matching first in direct2indirect()
117 reiserfs_panic(sb, "PAP-14050", in direct2indirect()
121 "vs-14055: direct item expected(%K), found %h", in direct2indirect()
123 tail_size = (le_ih_k_offset(p_le_ih) & (blk_size - 1)) in direct2indirect()
124 + ih_item_len(p_le_ih) - 1; in direct2indirect()
130 * Special case: unbh->b_page will be NULL if we are coming in direct2indirect()
133 if (!unbh->b_page || buffer_uptodate(unbh) in direct2indirect()
134 || PageUptodate(unbh->b_page)) { in direct2indirect()
155 (tail_offset + total_tail - 1) & (PAGE_SIZE - 1); in direct2indirect()
156 char *kaddr = kmap_atomic(up_to_date_bh->b_page); in direct2indirect()
157 memset(kaddr + pgoff, 0, blk_size - total_tail); in direct2indirect()
161 REISERFS_I(inode)->i_first_direct_byte = U32_MAX; in direct2indirect()
176 * interested in removing it from per-sb j_dirty_buffers list, to avoid in reiserfs_unmap_buffer()
179 if ((!list_empty(&bh->b_assoc_buffers) || bh->b_private) && bh->b_page) { in reiserfs_unmap_buffer()
180 struct inode *inode = bh->b_page->mapping->host; in reiserfs_unmap_buffer()
181 struct reiserfs_journal *j = SB_JOURNAL(inode->i_sb); in reiserfs_unmap_buffer()
182 spin_lock(&j->j_dirty_buffers_lock); in reiserfs_unmap_buffer()
183 list_del_init(&bh->b_assoc_buffers); in reiserfs_unmap_buffer()
185 spin_unlock(&j->j_dirty_buffers_lock); in reiserfs_unmap_buffer()
190 bh->b_bdev = NULL; in reiserfs_unmap_buffer()
199 * in the unformatted node, we set mode to SKIP_BALANCING and unlock
211 struct super_block *sb = inode->i_sb; in indirect2direct()
213 unsigned long block_size = sb->s_blocksize; in indirect2direct()
219 BUG_ON(!th->t_trans_id); in indirect2direct()
221 REISERFS_SB(sb)->s_indirect2direct++; in indirect2direct()
228 tail_len = (n_new_file_size & (block_size - 1)); in indirect2direct()
235 le_ih_k_offset(&s_ih) - 1 + (ih_item_len(&s_ih) / UNFM_P_SIZE - in indirect2direct()
236 1) * sb->s_blocksize; in indirect2direct()
248 /* re-search indirect item */ in indirect2direct()
251 reiserfs_panic(sb, "PAP-5520", in indirect2direct()
256 pos = le_ih_k_offset(&s_ih) - 1 + in indirect2direct()
257 (ih_item_len(&s_ih) / UNFM_P_SIZE - in indirect2direct()
258 1) * sb->s_blocksize; in indirect2direct()
260 reiserfs_panic(sb, "vs-5530", "tail position " in indirect2direct()
275 tail = tail + (pos & (PAGE_SIZE - 1)); in indirect2direct()
294 return block_size - round_tail_len; in indirect2direct()
303 * conversion: there are two keys which have matching first three in indirect2direct()
313 /* we store position of first direct item in the in-core inode */ in indirect2direct()
315 REISERFS_I(inode)->i_first_direct_byte = pos1 + 1; in indirect2direct()
317 return block_size - round_tail_len; in indirect2direct()