Home
last modified time | relevance | path

Searched refs:bh (Results 1 – 25 of 258) sorted by relevance

1234567891011

/linux-2.4.37.9/fs/
Dbuffer.c133 static inline int write_buffer_delay(struct buffer_head *bh) in write_buffer_delay() argument
135 struct page *page = bh->b_page; in write_buffer_delay()
139 unlock_buffer(bh); in write_buffer_delay()
147 static inline void write_buffer(struct buffer_head *bh) in write_buffer() argument
149 if (buffer_delay(bh)) { in write_buffer()
150 struct page *page = bh->b_page; in write_buffer()
153 if (buffer_delay(bh)) { in write_buffer()
160 ll_rw_block(WRITE, 1, &bh); in write_buffer()
163 void fastcall unlock_buffer(struct buffer_head *bh) in unlock_buffer() argument
165 clear_bit(BH_Wait_IO, &bh->b_state); in unlock_buffer()
[all …]
/linux-2.4.37.9/fs/jbd/
Dcommit.c31 void journal_end_buffer_io_sync(struct buffer_head *bh, int uptodate) in journal_end_buffer_io_sync() argument
33 BUFFER_TRACE(bh, ""); in journal_end_buffer_io_sync()
34 mark_buffer_uptodate(bh, uptodate); in journal_end_buffer_io_sync()
35 unlock_buffer(bh); in journal_end_buffer_io_sync()
52 static void release_buffer_page(struct buffer_head *bh) in release_buffer_page() argument
56 if (buffer_dirty(bh)) in release_buffer_page()
58 if (atomic_read(&bh->b_count) != 1) in release_buffer_page()
60 page = bh->b_page; in release_buffer_page()
71 __brelse(bh); in release_buffer_page()
78 __brelse(bh); in release_buffer_page()
[all …]
Drecovery.c75 struct buffer_head *bh; in do_readahead() local
98 bh = getblk(journal->j_dev, blocknr, journal->j_blocksize); in do_readahead()
99 if (!bh) { in do_readahead()
104 if (!buffer_uptodate(bh) && !buffer_locked(bh)) { in do_readahead()
105 bufs[nbufs++] = bh; in do_readahead()
112 brelse(bh); in do_readahead()
137 struct buffer_head *bh; in jread() local
154 bh = getblk(journal->j_dev, blocknr, journal->j_blocksize); in jread()
155 if (!bh) in jread()
158 if (!buffer_uptodate(bh)) { in jread()
[all …]
Dtransaction.c563 struct buffer_head *bh; in do_get_write_access() local
575 bh = jh2bh(jh); in do_get_write_access()
583 locked = test_and_set_bit(BH_Lock, &bh->b_state); in do_get_write_access()
589 __wait_on_buffer(bh); in do_get_write_access()
607 if (buffer_dirty(bh)) { in do_get_write_access()
623 unlock_buffer(bh); in do_get_write_access()
777 int journal_get_write_access (handle_t *handle, struct buffer_head *bh) in journal_get_write_access() argument
781 struct journal_head *jh = journal_add_journal_head(bh); in journal_get_write_access()
814 int journal_get_create_access (handle_t *handle, struct buffer_head *bh) in journal_get_create_access() argument
818 struct journal_head *jh = journal_add_journal_head(bh); in journal_get_create_access()
[all …]
/linux-2.4.37.9/fs/reiserfs/
Dprints.c132 static void sprintf_block_head (char * buf, struct buffer_head * bh) in sprintf_block_head() argument
135 B_LEVEL (bh), B_NR_ITEMS (bh), B_FREE_SPACE (bh)); in sprintf_block_head()
139 static void sprintf_buffer_head (char * buf, struct buffer_head * bh) in sprintf_buffer_head() argument
142 kdevname (bh->b_dev), bh->b_size, bh->b_blocknr, atomic_read (&(bh->b_count)), bh->b_list, in sprintf_buffer_head()
143 bh->b_state, bh->b_page, in sprintf_buffer_head()
144 buffer_uptodate (bh) ? "UPTODATE" : "!UPTODATE", in sprintf_buffer_head()
145 buffer_dirty (bh) ? "DIRTY" : "CLEAN", in sprintf_buffer_head()
146 buffer_locked (bh) ? "LOCKED" : "UNLOCKED"); in sprintf_buffer_head()
370 struct buffer_head * bh; in print_path() local
374 bh = PATH_H_PBUFFER (path, h); in print_path()
[all …]
/linux-2.4.37.9/fs/hpfs/
Dbuffer.c125 struct buffer_head *bh; in hpfs_map_sector() local
129 *bhp = bh = sb_bread(s, secno); in hpfs_map_sector()
130 if (bh != NULL) in hpfs_map_sector()
131 return bh->b_data; in hpfs_map_sector()
142 struct buffer_head *bh; in hpfs_get_sector() local
147 if ((*bhp = bh = sb_getblk(s, secno)) != NULL) { in hpfs_get_sector()
148 if (!buffer_uptodate(bh)) wait_on_buffer(bh); in hpfs_get_sector()
149 mark_buffer_uptodate(bh, 1); in hpfs_get_sector()
150 return bh->b_data; in hpfs_get_sector()
162 struct buffer_head *bh; in hpfs_map_4sectors() local
[all …]
Danode.c15 struct buffer_head *bh) in hpfs_bplus_lookup() argument
27 brelse(bh); in hpfs_bplus_lookup()
28 if (!(anode = hpfs_map_anode(s, a, &bh))) return -1; in hpfs_bplus_lookup()
33 brelse(bh); in hpfs_bplus_lookup()
41 brelse(bh); in hpfs_bplus_lookup()
49 brelse(bh); in hpfs_bplus_lookup()
53 brelse(bh); in hpfs_bplus_lookup()
66 struct buffer_head *bh, *bh1, *bh2; in hpfs_add_sector_to_btree() local
71 if (!(fnode = hpfs_map_fnode(s, node, &bh))) return -1; in hpfs_add_sector_to_btree()
74 if (!(anode = hpfs_map_anode(s, node, &bh))) return -1; in hpfs_add_sector_to_btree()
[all …]
/linux-2.4.37.9/fs/affs/
Dfile.c38 static struct buffer_head *affs_alloc_extblock(struct inode *inode, struct buffer_head *bh, u32 ext…
89 struct buffer_head *bh; in affs_grow_extcache() local
138 bh = affs_bread(sb, key); in affs_grow_extcache()
139 if (!bh) in affs_grow_extcache()
141 key = be32_to_cpu(AFFS_TAIL(sb, bh)->extension); in affs_grow_extcache()
142 affs_brelse(bh); in affs_grow_extcache()
156 affs_alloc_extblock(struct inode *inode, struct buffer_head *bh, u32 ext) in affs_alloc_extblock() argument
162 blocknr = affs_alloc_block(inode, bh->b_blocknr); in affs_alloc_extblock()
180 tmp = be32_to_cpu(AFFS_TAIL(sb, bh)->extension); in affs_alloc_extblock()
183 AFFS_TAIL(sb, bh)->extension = cpu_to_be32(blocknr); in affs_alloc_extblock()
[all …]
Damigaffs.c34 affs_insert_hash(struct inode *dir, struct buffer_head *bh) in affs_insert_hash() argument
41 ino = bh->b_blocknr; in affs_insert_hash()
42 offset = affs_hash_name(sb, AFFS_TAIL(sb, bh)->name + 1, AFFS_TAIL(sb, bh)->name[0]); in affs_insert_hash()
58 AFFS_TAIL(sb, bh)->parent = cpu_to_be32(dir->i_ino); in affs_insert_hash()
59 AFFS_TAIL(sb, bh)->hash_chain = 0; in affs_insert_hash()
60 affs_fix_checksum(sb, bh); in affs_insert_hash()
86 struct buffer_head *bh; in affs_remove_hash() local
95 bh = affs_bread(sb, dir->i_ino); in affs_remove_hash()
96 if (!bh) in affs_remove_hash()
100 hash_ino = be32_to_cpu(AFFS_HEAD(bh)->table[offset]); in affs_remove_hash()
[all …]
/linux-2.4.37.9/mm/
Dhighmem.c244 static inline void bounce_end_io (struct buffer_head *bh, int uptodate) in bounce_end_io() argument
247 struct buffer_head *bh_orig = (struct buffer_head *)(bh->b_private); in bounce_end_io()
252 page = bh->b_page; in bounce_end_io()
269 init_waitqueue_head(&bh->b_wait); in bounce_end_io()
271 kmem_cache_free(bh_cachep, bh); in bounce_end_io()
276 list_add(&bh->b_inode_buffers, &emergency_bhs); in bounce_end_io()
302 struct buffer_head * bh = kmem_cache_alloc(bh_cachep, SLAB_ATOMIC); in init_emergency_pool() local
303 if (!bh) { in init_emergency_pool()
307 list_add(&bh->b_inode_buffers, &emergency_bhs); in init_emergency_pool()
319 static void bounce_end_io_write (struct buffer_head *bh, int uptodate) in bounce_end_io_write() argument
[all …]
/linux-2.4.37.9/fs/xfs/linux-2.4/
Dxfs_aops.c108 struct buffer_head *bh, in linvfs_unwritten_done() argument
111 xfs_buf_t *pb = (xfs_buf_t *)bh->b_private; in linvfs_unwritten_done()
113 ASSERT(buffer_unwritten(bh)); in linvfs_unwritten_done()
114 bh->b_end_io = NULL; in linvfs_unwritten_done()
115 clear_buffer_unwritten(bh); in linvfs_unwritten_done()
121 end_buffer_io_async(bh, uptodate); in linvfs_unwritten_done()
190 struct buffer_head *bh, in xfs_map_at_offset() argument
215 lock_buffer(bh); in xfs_map_at_offset()
216 bh->b_blocknr = bn; in xfs_map_at_offset()
217 bh->b_dev = iomapp->iomap_target->pbr_kdev; in xfs_map_at_offset()
[all …]
/linux-2.4.37.9/fs/ufs/
Ddir.c59 struct buffer_head * bh; in ufs_readdir() local
71 bh = NULL; in ufs_readdir()
77 if (!blk || !(bh = sb_bread(sb, blk))) { in ufs_readdir()
93 de = (struct ufs_dir_entry *)(bh->b_data + i); in ufs_readdir()
113 de = (struct ufs_dir_entry *) (bh->b_data + offset); in ufs_readdir()
119 brelse(bh); in ufs_readdir()
123 bh, offset)) { in ufs_readdir()
129 brelse (bh); in ufs_readdir()
161 brelse (bh); in ufs_readdir()
207 struct buffer_head * bh; in ufs_find_entry() local
[all …]
/linux-2.4.37.9/fs/minix/
Dbitmap.c25 struct buffer_head *bh; in count_free() local
28 if (!(bh=map[i])) in count_free()
31 sum += nibblemap[bh->b_data[j] & 0xf] in count_free()
32 + nibblemap[(bh->b_data[j]>>4) & 0xf]; in count_free()
35 if (numblocks==0 || !(bh=map[numblocks-1])) in count_free()
39 sum += nibblemap[bh->b_data[j] & 0xf] in count_free()
40 + nibblemap[(bh->b_data[j]>>4) & 0xf]; in count_free()
45 i = *(__u16 *)(&bh->b_data[j]) | ~((1<<i) - 1); in count_free()
55 struct buffer_head * bh; in minix_free_block() local
74 bh = sb->u.minix_sb.s_zmap[zone]; in minix_free_block()
[all …]
Ditree_common.c6 struct buffer_head *bh; member
9 static inline void add_chain(Indirect *p, struct buffer_head *bh, block_t *v) in add_chain() argument
12 p->bh = bh; in add_chain()
22 static inline block_t *block_end(struct buffer_head *bh) in block_end() argument
24 return (block_t *)((char*)bh->b_data + BLOCK_SIZE); in block_end()
35 struct buffer_head *bh; in get_branch() local
43 bh = sb_bread(sb, block_to_cpu(p->key)); in get_branch()
44 if (!bh) in get_branch()
49 add_chain(++p, bh, (block_t *)bh->b_data + *++offsets); in get_branch()
76 struct buffer_head *bh; in alloc_branch() local
[all …]
/linux-2.4.37.9/include/linux/
Dext3_jbd.h90 struct buffer_head *bh, in ext3_journal_abort_handle() argument
100 if (bh) in ext3_journal_abort_handle()
101 BUFFER_TRACE(bh, "abort"); in ext3_journal_abort_handle()
109 handle_t *handle, struct buffer_head *bh) in __ext3_journal_get_undo_access() argument
111 int err = journal_get_undo_access(handle, bh); in __ext3_journal_get_undo_access()
113 ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err); in __ext3_journal_get_undo_access()
119 handle_t *handle, struct buffer_head *bh) in __ext3_journal_get_write_access() argument
121 int err = journal_get_write_access(handle, bh); in __ext3_journal_get_write_access()
123 ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err); in __ext3_journal_get_write_access()
129 handle_t *handle, struct buffer_head *bh, int async) in __ext3_journal_dirty_data() argument
[all …]
Damigaffs.h21 #define AFFS_BLOCK(sb, bh, blk) (AFFS_HEAD(bh)->table[(sb)->u.affs_sb.s_hashsize-1-(blk)]) argument
48 struct buffer_head *bh; in affs_getzeroblk() local
51 bh = sb_getblk(sb, block); in affs_getzeroblk()
52 lock_buffer(bh); in affs_getzeroblk()
53 memset(bh->b_data, 0 , sb->s_blocksize); in affs_getzeroblk()
54 mark_buffer_uptodate(bh, 1); in affs_getzeroblk()
55 unlock_buffer(bh); in affs_getzeroblk()
56 return bh; in affs_getzeroblk()
63 struct buffer_head *bh; in affs_getemptyblk() local
66 bh = sb_getblk(sb, block); in affs_getemptyblk()
[all …]
/linux-2.4.37.9/drivers/scsi/
Dscsi_merge.c90 struct buffer_head *bh; in dump_stats() local
99 for (bh = req->bh; bh->b_reqnext != NULL; bh = bh->b_reqnext) in dump_stats()
102 bh, in dump_stats()
103 bh->b_size >> 9, in dump_stats()
104 bh_phys(bh) - 1); in dump_stats()
193 struct buffer_head *bh; in __count_segments() local
203 bh = req->bh; in __count_segments()
205 if( reqsize + bh->b_size > PAGE_SIZE ) { in __count_segments()
207 reqsize = bh->b_size; in __count_segments()
209 reqsize += bh->b_size; in __count_segments()
[all …]
/linux-2.4.37.9/fs/fat/
Dbuffer.c29 void fat_brelse (struct super_block *sb, struct buffer_head *bh) in fat_brelse() argument
31 if (bh) in fat_brelse()
32 MSDOS_SB(sb)->cvf_format->cvf_brelse(sb,bh); in fat_brelse()
36 struct buffer_head *bh) in fat_mark_buffer_dirty() argument
38 MSDOS_SB(sb)->cvf_format->cvf_mark_buffer_dirty(sb,bh); in fat_mark_buffer_dirty()
42 struct buffer_head *bh, in fat_set_uptodate() argument
45 MSDOS_SB(sb)->cvf_format->cvf_set_uptodate(sb,bh,val); in fat_set_uptodate()
47 int fat_is_uptodate(struct super_block *sb, struct buffer_head *bh) in fat_is_uptodate() argument
49 return MSDOS_SB(sb)->cvf_format->cvf_is_uptodate(sb,bh); in fat_is_uptodate()
55 struct buffer_head *bh[32]) in fat_ll_rw_block()
[all …]
/linux-2.4.37.9/fs/sysv/
Dballoc.c30 static inline u32 *get_chunk(struct super_block *sb, struct buffer_head *bh) in get_chunk() argument
32 char *bh_data = bh->b_data; in get_chunk()
44 struct buffer_head * bh; in sysv_free_block() local
76 bh = sb_getblk(sb, block); in sysv_free_block()
77 if (!bh) { in sysv_free_block()
82 memset(bh->b_data, 0, sb->s_blocksize); in sysv_free_block()
83 *(u16*)bh->b_data = cpu_to_fs16(sb, count); in sysv_free_block()
84 memcpy(get_chunk(sb,bh), blocks, count * sizeof(sysv_zone_t)); in sysv_free_block()
85 mark_buffer_dirty(bh); in sysv_free_block()
86 mark_buffer_uptodate(bh, 1); in sysv_free_block()
[all …]
/linux-2.4.37.9/fs/qnx4/
Dinode.c41 struct buffer_head *bh; in qnx4_sync_inode()
43 bh = qnx4_update_inode(inode); in qnx4_sync_inode()
44 if (bh && buffer_dirty(bh)) in qnx4_sync_inode()
46 ll_rw_block(WRITE, 1, &bh); in qnx4_sync_inode()
47 wait_on_buffer(bh); in qnx4_sync_inode()
48 if (buffer_req(bh) && !buffer_uptodate(bh)) in qnx4_sync_inode()
54 brelse (bh); in qnx4_sync_inode()
55 } else if (!bh) { in qnx4_sync_inode()
83 struct buffer_head *bh; in qnx4_write_inode() local
98 if (!(bh = sb_bread(inode->i_sb, block))) { in qnx4_write_inode()
[all …]
Dnamei.c33 struct buffer_head *bh, unsigned long *offset) in qnx4_match() argument
38 if (bh == NULL) { in qnx4_match()
42 de = (struct qnx4_inode_entry *) (bh->b_data + *offset); in qnx4_match()
71 struct buffer_head *bh; in qnx4_find_entry() local
78 bh = NULL; in qnx4_find_entry()
81 if (!bh) { in qnx4_find_entry()
82 bh = qnx4_bread(dir, blkofs, 0); in qnx4_find_entry()
83 if (!bh) { in qnx4_find_entry()
88 *res_dir = (struct qnx4_inode_entry *) (bh->b_data + offset); in qnx4_find_entry()
89 if (qnx4_match(len, name, bh, &offset)) { in qnx4_find_entry()
[all …]
/linux-2.4.37.9/fs/ext3/
Dinode.c64 struct inode *inode, struct buffer_head *bh, in ext3_forget() argument
69 BUFFER_TRACE(bh, "enter"); in ext3_forget()
73 bh, is_metadata, inode->i_mode, in ext3_forget()
83 if (bh) { in ext3_forget()
84 BUFFER_TRACE(bh, "call journal_forget"); in ext3_forget()
85 ext3_journal_forget(handle, bh); in ext3_forget()
93 BUFFER_TRACE(bh, "call ext3_journal_revoke"); in ext3_forget()
94 err = ext3_journal_revoke(handle, blocknr, bh); in ext3_forget()
98 BUFFER_TRACE(bh, "exit"); in ext3_forget()
310 struct buffer_head *bh; member
[all …]
/linux-2.4.37.9/fs/udf/
Dtruncate.c36 lb_addr eloc, int8_t etype, uint32_t elen, struct buffer_head *bh, uint32_t nelen) in extent_trunc() argument
56 udf_write_aext(inode, bloc, &extoffset, neloc, nelen, bh, 0); in extent_trunc()
74 struct buffer_head *bh = NULL; in udf_truncate_extents() local
84 etype = inode_bmap(inode, first_block, &bloc, &extoffset, &eloc, &elen, &offset, &bh); in udf_truncate_extents()
89 extent_trunc(inode, bloc, extoffset, eloc, etype, elen, bh, offset); in udf_truncate_extents()
102 while ((etype = udf_current_aext(inode, &bloc, &extoffset, &eloc, &elen, &bh, 0)) != -1) in udf_truncate_extents()
106 udf_write_aext(inode, bloc, &extoffset, neloc, nelen, bh, 0); in udf_truncate_extents()
111 memset(bh->b_data, 0x00, udf_file_entry_alloc_offset(inode)); in udf_truncate_extents()
113 memset(bh->b_data, 0x00, sizeof(struct allocExtDesc)); in udf_truncate_extents()
125 struct allocExtDesc *aed = (struct allocExtDesc *)(bh->b_data); in udf_truncate_extents()
[all …]
/linux-2.4.37.9/drivers/block/
Dll_rw_blk.c296 static inline int __blk_seg_merge_ok(struct buffer_head *bh, struct buffer_head *nxt) in __blk_seg_merge_ok() argument
301 if (BH_CONTIG(bh, nxt) && BH_PHYS_4G(bh, nxt)) in __blk_seg_merge_ok()
307 int blk_seg_merge_ok(struct buffer_head *bh, struct buffer_head *nxt) in blk_seg_merge_ok() argument
309 return __blk_seg_merge_ok(bh, nxt); in blk_seg_merge_ok()
322 struct buffer_head *bh, int max_segments) in ll_back_merge_fn() argument
324 if (__blk_seg_merge_ok(req->bhtail, bh)) in ll_back_merge_fn()
331 struct buffer_head *bh, int max_segments) in ll_front_merge_fn() argument
333 if (__blk_seg_merge_ok(bh, req->bh)) in ll_front_merge_fn()
344 if (__blk_seg_merge_ok(req->bhtail, next->bh)) in ll_merge_requests_fn()
481 static int __make_request(request_queue_t * q, int rw, struct buffer_head * bh);
[all …]
/linux-2.4.37.9/fs/ext2/
Dialloc.c48 struct buffer_head *bh = NULL; in read_inode_bitmap() local
54 bh = sb_bread(sb, le32_to_cpu(desc->bg_inode_bitmap)); in read_inode_bitmap()
55 if (!bh) in read_inode_bitmap()
61 return bh; in read_inode_bitmap()
82 struct buffer_head *bh = sbi->s_inode_bitmap[0]; in load_inode_bitmap() local
91 sbi->s_inode_bitmap_number[0] == block_group && bh) in load_inode_bitmap()
96 bh = sbi->s_inode_bitmap[slot]; in load_inode_bitmap()
97 if (!bh) in load_inode_bitmap()
105 bh = NULL; in load_inode_bitmap()
111 bh = sbi->s_inode_bitmap[i]; in load_inode_bitmap()
[all …]

1234567891011