Lines Matching refs:qbh
55 void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffer_head *qbh, in hpfs_map_4sectors() argument
70 qbh->data = data = kmalloc(2048, GFP_NOFS); in hpfs_map_4sectors()
76 qbh->bh[0] = bh = sb_bread(s, secno); in hpfs_map_4sectors()
81 qbh->bh[1] = bh = sb_bread(s, secno + 1); in hpfs_map_4sectors()
86 qbh->bh[2] = bh = sb_bread(s, secno + 2); in hpfs_map_4sectors()
91 qbh->bh[3] = bh = sb_bread(s, secno + 3); in hpfs_map_4sectors()
99 brelse(qbh->bh[2]); in hpfs_map_4sectors()
101 brelse(qbh->bh[1]); in hpfs_map_4sectors()
103 brelse(qbh->bh[0]); in hpfs_map_4sectors()
114 struct quad_buffer_head *qbh) in hpfs_get_4sectors() argument
126 if (!(qbh->data = kmalloc(2048, GFP_NOFS))) { in hpfs_get_4sectors()
130 if (!(hpfs_get_sector(s, secno, &qbh->bh[0]))) goto bail0; in hpfs_get_4sectors()
131 if (!(hpfs_get_sector(s, secno + 1, &qbh->bh[1]))) goto bail1; in hpfs_get_4sectors()
132 if (!(hpfs_get_sector(s, secno + 2, &qbh->bh[2]))) goto bail2; in hpfs_get_4sectors()
133 if (!(hpfs_get_sector(s, secno + 3, &qbh->bh[3]))) goto bail3; in hpfs_get_4sectors()
134 memcpy(qbh->data, qbh->bh[0]->b_data, 512); in hpfs_get_4sectors()
135 memcpy(qbh->data + 512, qbh->bh[1]->b_data, 512); in hpfs_get_4sectors()
136 memcpy(qbh->data + 2*512, qbh->bh[2]->b_data, 512); in hpfs_get_4sectors()
137 memcpy(qbh->data + 3*512, qbh->bh[3]->b_data, 512); in hpfs_get_4sectors()
138 return qbh->data; in hpfs_get_4sectors()
140 bail3: brelse(qbh->bh[2]); in hpfs_get_4sectors()
141 bail2: brelse(qbh->bh[1]); in hpfs_get_4sectors()
142 bail1: brelse(qbh->bh[0]); in hpfs_get_4sectors()
148 void hpfs_brelse4(struct quad_buffer_head *qbh) in hpfs_brelse4() argument
150 brelse(qbh->bh[3]); in hpfs_brelse4()
151 brelse(qbh->bh[2]); in hpfs_brelse4()
152 brelse(qbh->bh[1]); in hpfs_brelse4()
153 brelse(qbh->bh[0]); in hpfs_brelse4()
154 kfree(qbh->data); in hpfs_brelse4()
157 void hpfs_mark_4buffers_dirty(struct quad_buffer_head *qbh) in hpfs_mark_4buffers_dirty() argument
160 memcpy(qbh->bh[0]->b_data, qbh->data, 512); in hpfs_mark_4buffers_dirty()
161 memcpy(qbh->bh[1]->b_data, qbh->data + 512, 512); in hpfs_mark_4buffers_dirty()
162 memcpy(qbh->bh[2]->b_data, qbh->data + 2 * 512, 512); in hpfs_mark_4buffers_dirty()
163 memcpy(qbh->bh[3]->b_data, qbh->data + 3 * 512, 512); in hpfs_mark_4buffers_dirty()
164 mark_buffer_dirty(qbh->bh[0]); in hpfs_mark_4buffers_dirty()
165 mark_buffer_dirty(qbh->bh[1]); in hpfs_mark_4buffers_dirty()
166 mark_buffer_dirty(qbh->bh[2]); in hpfs_mark_4buffers_dirty()
167 mark_buffer_dirty(qbh->bh[3]); in hpfs_mark_4buffers_dirty()