• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/fs/hfsplus_journal/

Lines Matching refs:hfsplus_handle

110 static void hfsplus_journal_abort_handle(const char *err_no, struct buffer_head *bh, hfsplus_handle_t *hfsplus_handle)
112 if (hfsplus_jbd_is_handle_aborted(hfsplus_handle->handle))
116 hfsplus_jbd_abort_handle(hfsplus_handle->handle);
119 int hfsplus_journal_get_write_access(const char *err_fn, hfsplus_handle_t *hfsplus_handle, struct buffer_head *bh)
123 if (hfsplus_handle->journaled != HFSPLUS_JOURNAL_PRESENT)
126 err = hfsplus_jbd_get_write_access(hfsplus_handle->handle, bh);
129 hfsplus_journal_abort_handle(err_fn, bh, hfsplus_handle);
135 int hfsplus_journal_dirty_metadata(const char *err_fn, struct buffer_head *bh, hfsplus_handle_t *hfsplus_handle)
139 if (hfsplus_handle->journaled != HFSPLUS_JOURNAL_PRESENT)
142 err = hfsplus_jbd_dirty_metadata(hfsplus_handle->handle, bh);
144 if (!hfsplus_handle->handle->h_err)
145 hfsplus_handle->handle->h_err = err;
147 if (hfsplus_jbd_is_handle_aborted(hfsplus_handle->handle))
152 hfsplus_jbd_abort_handle(hfsplus_handle->handle);
154 hfsplus_handle->hcnt++;
177 int hfsplus_journal_start(const char *err_fn, struct super_block *sb, hfsplus_handle_t *hfsplus_handle)
181 hfsplus_handle->journaled = HFSPLUS_SB(sb).jnl.journaled;
182 if ((hfsplus_handle->journaled != HFSPLUS_JOURNAL_PRESENT) || (journal == NULL)) {
183 hfsplus_handle->handle = NULL;
193 hfsplus_handle->hcnt = 0;
194 hfsplus_handle->maxblock = HFSPLUS_SB(sb).jnl.journal_maxblock;
195 hfsplus_handle->handle = hfsplus_jbd_start(journal, HFSPLUS_SB(sb).jnl.journal_maxblock, hfsplus_handle);
196 if (IS_ERR(hfsplus_handle->handle)) {
197 printk(KERN_ERR "HFS+fs: journal cannot be started from %s. Error number: %ld\n", err_fn, PTR_ERR(hfsplus_handle->handle));
198 return PTR_ERR(hfsplus_handle->handle);
204 int hfsplus_journal_stop(hfsplus_handle_t *hfsplus_handle)
206 if ((hfsplus_handle->journaled != HFSPLUS_JOURNAL_PRESENT) || (hfsplus_handle->handle == NULL)) {
210 return hfsplus_jbd_stop(hfsplus_handle->handle);
312 static int hfsplus_journalled_write_full_page(hfsplus_handle_t *hfsplus_handle, struct page *page)
322 ret = hfsplus_walk_page_buffers(hfsplus_handle, page_buffers(page), 0,
325 err = hfsplus_walk_page_buffers(hfsplus_handle, page_buffers(page), 0,
333 int hfsplus_journalled_set_page_dirty(hfsplus_handle_t *hfsplus_handle, struct page *page)
335 if (hfsplus_handle->journaled != HFSPLUS_JOURNAL_PRESENT) {
342 if (hfsplus_handle->hcnt < hfsplus_handle->maxblock) {
346 ret = hfsplus_journalled_write_full_page(hfsplus_handle, page);
350 printk("BTREE: HFS+-fs: Count exceeds (count %d, maxblock: %d)\n", hfsplus_handle->hcnt++, hfsplus_handle->maxblock);
356 if (hfsplus_handle->hcnt < hfsplus_handle->maxblock) {
360 ret = hfsplus_journalled_write_full_page(hfsplus_handle, page);
364 printk("HFS+-fs: Count exceeds (count %d, maxblock: %d)\n", hfsplus_handle->hcnt++, hfsplus_handle->maxblock);
374 int hfsplus_journalled_mark_inode_dirty(const char *err_fn, hfsplus_handle_t *hfsplus_handle, struct inode *inode)
379 if (hfsplus_handle->journaled != HFSPLUS_JOURNAL_PRESENT) {
385 hfsplus_ext_write_extent(hfsplus_handle, inode);
387 return hfsplus_cat_write_inode(hfsplus_handle, inode);
392 ret = hfsplus_cat_write_inode(hfsplus_handle, inode);
400 hfs_btree_write(hfsplus_handle, HFSPLUS_SB(inode->i_sb).ext_tree);
408 hfs_btree_write(hfsplus_handle, HFSPLUS_SB(inode->i_sb).cat_tree);
430 hfs_btree_write(hfsplus_handle, HFSPLUS_SB(inode->i_sb).attr_tree);