@@ -369,126 +369,137 @@ typedef int (*search_strategy_t)(struct hfs_bnode *,
369369/* attributes.c */
370370int __init hfsplus_create_attr_tree_cache (void );
371371void hfsplus_destroy_attr_tree_cache (void );
372+ int hfsplus_attr_bin_cmp_key (const hfsplus_btree_key * k1 ,
373+ const hfsplus_btree_key * k2 );
374+ int hfsplus_attr_build_key (struct super_block * sb , hfsplus_btree_key * key ,
375+ u32 cnid , const char * name );
372376hfsplus_attr_entry * hfsplus_alloc_attr_entry (void );
373- void hfsplus_destroy_attr_entry (hfsplus_attr_entry * entry_p );
374- int hfsplus_attr_bin_cmp_key (const hfsplus_btree_key * ,
375- const hfsplus_btree_key * );
376- int hfsplus_attr_build_key (struct super_block * , hfsplus_btree_key * ,
377- u32 , const char * );
378- int hfsplus_find_attr (struct super_block * , u32 ,
379- const char * , struct hfs_find_data * );
377+ void hfsplus_destroy_attr_entry (hfsplus_attr_entry * entry );
378+ int hfsplus_find_attr (struct super_block * sb , u32 cnid , const char * name ,
379+ struct hfs_find_data * fd );
380380int hfsplus_attr_exists (struct inode * inode , const char * name );
381- int hfsplus_create_attr (struct inode * , const char * , const void * , size_t );
382- int hfsplus_delete_attr (struct inode * , const char * );
381+ int hfsplus_create_attr (struct inode * inode , const char * name ,
382+ const void * value , size_t size );
383+ int hfsplus_delete_attr (struct inode * inode , const char * name );
383384int hfsplus_delete_all_attrs (struct inode * dir , u32 cnid );
384385
385386/* bitmap.c */
386- int hfsplus_block_allocate (struct super_block * , u32 , u32 , u32 * );
387- int hfsplus_block_free (struct super_block * , u32 , u32 );
387+ int hfsplus_block_allocate (struct super_block * sb , u32 size , u32 offset ,
388+ u32 * max );
389+ int hfsplus_block_free (struct super_block * sb , u32 offset , u32 count );
388390
389391/* btree.c */
390- u32 hfsplus_calc_btree_clump_size (u32 , u32 , u64 , int );
391- struct hfs_btree * hfs_btree_open (struct super_block * , u32 );
392- void hfs_btree_close (struct hfs_btree * );
393- int hfs_btree_write (struct hfs_btree * );
394- struct hfs_bnode * hfs_bmap_alloc (struct hfs_btree * );
395- void hfs_bmap_free (struct hfs_bnode * );
392+ u32 hfsplus_calc_btree_clump_size (u32 block_size , u32 node_size , u64 sectors ,
393+ int file_id );
394+ struct hfs_btree * hfs_btree_open (struct super_block * sb , u32 id );
395+ void hfs_btree_close (struct hfs_btree * tree );
396+ int hfs_btree_write (struct hfs_btree * tree );
397+ struct hfs_bnode * hfs_bmap_alloc (struct hfs_btree * tree );
398+ void hfs_bmap_free (struct hfs_bnode * node );
396399
397400/* bnode.c */
398- void hfs_bnode_read (struct hfs_bnode * , void * , int , int );
399- u16 hfs_bnode_read_u16 (struct hfs_bnode * , int );
400- u8 hfs_bnode_read_u8 (struct hfs_bnode * , int );
401- void hfs_bnode_read_key (struct hfs_bnode * , void * , int );
402- void hfs_bnode_write (struct hfs_bnode * , void * , int , int );
403- void hfs_bnode_write_u16 (struct hfs_bnode * , int , u16 );
404- void hfs_bnode_clear (struct hfs_bnode * , int , int );
405- void hfs_bnode_copy (struct hfs_bnode * , int ,
406- struct hfs_bnode * , int , int );
407- void hfs_bnode_move (struct hfs_bnode * , int , int , int );
408- void hfs_bnode_dump (struct hfs_bnode * );
409- void hfs_bnode_unlink (struct hfs_bnode * );
410- struct hfs_bnode * hfs_bnode_findhash (struct hfs_btree * , u32 );
411- struct hfs_bnode * hfs_bnode_find (struct hfs_btree * , u32 );
412- void hfs_bnode_unhash (struct hfs_bnode * );
413- void hfs_bnode_free (struct hfs_bnode * );
414- struct hfs_bnode * hfs_bnode_create (struct hfs_btree * , u32 );
415- void hfs_bnode_get (struct hfs_bnode * );
416- void hfs_bnode_put (struct hfs_bnode * );
417- bool hfs_bnode_need_zeroout (struct hfs_btree * );
401+ void hfs_bnode_read (struct hfs_bnode * node , void * buf , int off , int len );
402+ u16 hfs_bnode_read_u16 (struct hfs_bnode * node , int off );
403+ u8 hfs_bnode_read_u8 (struct hfs_bnode * node , int off );
404+ void hfs_bnode_read_key (struct hfs_bnode * node , void * key , int off );
405+ void hfs_bnode_write (struct hfs_bnode * node , void * buf , int off , int len );
406+ void hfs_bnode_write_u16 (struct hfs_bnode * node , int off , u16 data );
407+ void hfs_bnode_clear (struct hfs_bnode * node , int off , int len );
408+ void hfs_bnode_copy (struct hfs_bnode * dst_node , int dst ,
409+ struct hfs_bnode * src_node , int src , int len );
410+ void hfs_bnode_move (struct hfs_bnode * node , int dst , int src , int len );
411+ void hfs_bnode_dump (struct hfs_bnode * node );
412+ void hfs_bnode_unlink (struct hfs_bnode * node );
413+ struct hfs_bnode * hfs_bnode_findhash (struct hfs_btree * tree , u32 cnid );
414+ void hfs_bnode_unhash (struct hfs_bnode * node );
415+ struct hfs_bnode * hfs_bnode_find (struct hfs_btree * tree , u32 num );
416+ void hfs_bnode_free (struct hfs_bnode * node );
417+ struct hfs_bnode * hfs_bnode_create (struct hfs_btree * tree , u32 num );
418+ void hfs_bnode_get (struct hfs_bnode * node );
419+ void hfs_bnode_put (struct hfs_bnode * node );
420+ bool hfs_bnode_need_zeroout (struct hfs_btree * tree );
418421
419422/* brec.c */
420- u16 hfs_brec_lenoff (struct hfs_bnode * , u16 , u16 * );
421- u16 hfs_brec_keylen (struct hfs_bnode * , u16 );
422- int hfs_brec_insert (struct hfs_find_data * , void * , int );
423- int hfs_brec_remove (struct hfs_find_data * );
423+ u16 hfs_brec_lenoff (struct hfs_bnode * node , u16 rec , u16 * off );
424+ u16 hfs_brec_keylen (struct hfs_bnode * node , u16 rec );
425+ int hfs_brec_insert (struct hfs_find_data * fd , void * entry , int entry_len );
426+ int hfs_brec_remove (struct hfs_find_data * fd );
424427
425428/* bfind.c */
426- int hfs_find_init (struct hfs_btree * , struct hfs_find_data * );
427- void hfs_find_exit (struct hfs_find_data * );
428- int hfs_find_1st_rec_by_cnid (struct hfs_bnode * ,
429- struct hfs_find_data * ,
430- int * , int * , int * );
431- int hfs_find_rec_by_key (struct hfs_bnode * ,
432- struct hfs_find_data * ,
433- int * , int * , int * );
434- int __hfs_brec_find (struct hfs_bnode * , struct hfs_find_data * ,
435- search_strategy_t );
436- int hfs_brec_find (struct hfs_find_data * , search_strategy_t );
437- int hfs_brec_read (struct hfs_find_data * , void * , int );
438- int hfs_brec_goto (struct hfs_find_data * , int );
429+ int hfs_find_init (struct hfs_btree * tree , struct hfs_find_data * fd );
430+ void hfs_find_exit (struct hfs_find_data * fd );
431+ int hfs_find_1st_rec_by_cnid (struct hfs_bnode * bnode , struct hfs_find_data * fd ,
432+ int * begin , int * end , int * cur_rec );
433+ int hfs_find_rec_by_key (struct hfs_bnode * bnode , struct hfs_find_data * fd ,
434+ int * begin , int * end , int * cur_rec );
435+ int __hfs_brec_find (struct hfs_bnode * bnode , struct hfs_find_data * fd ,
436+ search_strategy_t rec_found );
437+ int hfs_brec_find (struct hfs_find_data * fd , search_strategy_t do_key_compare );
438+ int hfs_brec_read (struct hfs_find_data * fd , void * rec , int rec_len );
439+ int hfs_brec_goto (struct hfs_find_data * fd , int cnt );
439440
440441/* catalog.c */
441- int hfsplus_cat_case_cmp_key (const hfsplus_btree_key * ,
442- const hfsplus_btree_key * );
443- int hfsplus_cat_bin_cmp_key (const hfsplus_btree_key * ,
444- const hfsplus_btree_key * );
445- void hfsplus_cat_build_key (struct super_block * sb ,
446- hfsplus_btree_key * , u32 , struct qstr * );
447- int hfsplus_find_cat (struct super_block * , u32 , struct hfs_find_data * );
448- int hfsplus_create_cat (u32 , struct inode * , struct qstr * , struct inode * );
449- int hfsplus_delete_cat (u32 , struct inode * , struct qstr * );
450- int hfsplus_rename_cat (u32 , struct inode * , struct qstr * ,
451- struct inode * , struct qstr * );
442+ int hfsplus_cat_case_cmp_key (const hfsplus_btree_key * k1 ,
443+ const hfsplus_btree_key * k2 );
444+ int hfsplus_cat_bin_cmp_key (const hfsplus_btree_key * k1 ,
445+ const hfsplus_btree_key * k2 );
446+ void hfsplus_cat_build_key (struct super_block * sb , hfsplus_btree_key * key ,
447+ u32 parent , struct qstr * str );
452448void hfsplus_cat_set_perms (struct inode * inode , struct hfsplus_perm * perms );
449+ int hfsplus_find_cat (struct super_block * sb , u32 cnid ,
450+ struct hfs_find_data * fd );
451+ int hfsplus_create_cat (u32 cnid , struct inode * dir , struct qstr * str ,
452+ struct inode * inode );
453+ int hfsplus_delete_cat (u32 cnid , struct inode * dir , struct qstr * str );
454+ int hfsplus_rename_cat (u32 cnid , struct inode * src_dir , struct qstr * src_name ,
455+ struct inode * dst_dir , struct qstr * dst_name );
453456
454457/* dir.c */
455458extern const struct inode_operations hfsplus_dir_inode_operations ;
456459extern const struct file_operations hfsplus_dir_operations ;
457460
458461/* extents.c */
459- int hfsplus_ext_cmp_key (const hfsplus_btree_key * , const hfsplus_btree_key * );
460- int hfsplus_ext_write_extent (struct inode * );
461- int hfsplus_get_block (struct inode * , sector_t , struct buffer_head * , int );
462- int hfsplus_free_fork (struct super_block * , u32 ,
463- struct hfsplus_fork_raw * , int );
464- int hfsplus_file_extend (struct inode * , bool zeroout );
465- void hfsplus_file_truncate (struct inode * );
462+ int hfsplus_ext_cmp_key (const hfsplus_btree_key * k1 ,
463+ const hfsplus_btree_key * k2 );
464+ int hfsplus_ext_write_extent (struct inode * inode );
465+ int hfsplus_get_block (struct inode * inode , sector_t iblock ,
466+ struct buffer_head * bh_result , int create );
467+ int hfsplus_free_fork (struct super_block * sb , u32 cnid ,
468+ struct hfsplus_fork_raw * fork , int type );
469+ int hfsplus_file_extend (struct inode * inode , bool zeroout );
470+ void hfsplus_file_truncate (struct inode * inode );
466471
467472/* inode.c */
468473extern const struct address_space_operations hfsplus_aops ;
469474extern const struct address_space_operations hfsplus_btree_aops ;
470475extern const struct dentry_operations hfsplus_dentry_operations ;
471476
472- void hfsplus_inode_read_fork (struct inode * , struct hfsplus_fork_raw * );
473- void hfsplus_inode_write_fork (struct inode * , struct hfsplus_fork_raw * );
474- int hfsplus_cat_read_inode (struct inode * , struct hfs_find_data * );
475- int hfsplus_cat_write_inode (struct inode * );
476- struct inode * hfsplus_new_inode (struct super_block * , umode_t );
477- void hfsplus_delete_inode (struct inode * );
477+ struct inode * hfsplus_new_inode (struct super_block * sb , umode_t mode );
478+ void hfsplus_delete_inode (struct inode * inode );
479+ void hfsplus_inode_read_fork (struct inode * inode ,
480+ struct hfsplus_fork_raw * fork );
481+ void hfsplus_inode_write_fork (struct inode * inode ,
482+ struct hfsplus_fork_raw * fork );
483+ int hfsplus_cat_read_inode (struct inode * inode , struct hfs_find_data * fd );
484+ int hfsplus_cat_write_inode (struct inode * inode );
478485int hfsplus_file_fsync (struct file * file , loff_t start , loff_t end ,
479486 int datasync );
480487
481488/* ioctl.c */
482489long hfsplus_ioctl (struct file * filp , unsigned int cmd , unsigned long arg );
483490
484491/* options.c */
485- int hfsplus_parse_options ( char * , struct hfsplus_sb_info * );
492+ void hfsplus_fill_defaults ( struct hfsplus_sb_info * opts );
486493int hfsplus_parse_options_remount (char * input , int * force );
487- void hfsplus_fill_defaults (struct hfsplus_sb_info * );
488- int hfsplus_show_options (struct seq_file * , struct dentry * );
494+ int hfsplus_parse_options (char * input , struct hfsplus_sb_info * sbi );
495+ int hfsplus_show_options (struct seq_file * seq , struct dentry * root );
496+
497+ /* part_tbl.c */
498+ int hfs_part_find (struct super_block * sb , sector_t * part_start ,
499+ sector_t * part_size );
489500
490501/* super.c */
491- struct inode * hfsplus_iget (struct super_block * , unsigned long );
502+ struct inode * hfsplus_iget (struct super_block * sb , unsigned long ino );
492503void hfsplus_mark_mdb_dirty (struct super_block * sb );
493504
494505/* tables.c */
@@ -497,23 +508,23 @@ extern u16 hfsplus_decompose_table[];
497508extern u16 hfsplus_compose_table [];
498509
499510/* unicode.c */
500- int hfsplus_strcasecmp (const struct hfsplus_unistr * ,
501- const struct hfsplus_unistr * );
502- int hfsplus_strcmp (const struct hfsplus_unistr * ,
503- const struct hfsplus_unistr * );
504- int hfsplus_uni2asc (struct super_block * ,
505- const struct hfsplus_unistr * , char * , int * );
506- int hfsplus_asc2uni (struct super_block * ,
507- struct hfsplus_unistr * , int , const char * , int );
511+ int hfsplus_strcasecmp (const struct hfsplus_unistr * s1 ,
512+ const struct hfsplus_unistr * s2 );
513+ int hfsplus_strcmp (const struct hfsplus_unistr * s1 ,
514+ const struct hfsplus_unistr * s2 );
515+ int hfsplus_uni2asc (struct super_block * sb , const struct hfsplus_unistr * ustr ,
516+ char * astr , int * len_p );
517+ int hfsplus_asc2uni (struct super_block * sb , struct hfsplus_unistr * ustr ,
518+ int max_unistr_len , const char * astr , int len );
508519int hfsplus_hash_dentry (const struct dentry * dentry , struct qstr * str );
509- int hfsplus_compare_dentry (const struct dentry * parent , const struct dentry * dentry ,
510- unsigned int len , const char * str , const struct qstr * name );
520+ int hfsplus_compare_dentry (const struct dentry * parent ,
521+ const struct dentry * dentry , unsigned int len ,
522+ const char * str , const struct qstr * name );
511523
512524/* wrapper.c */
513- int hfsplus_read_wrapper (struct super_block * );
514- int hfs_part_find (struct super_block * , sector_t * , sector_t * );
515- int hfsplus_submit_bio (struct super_block * sb , sector_t sector ,
516- void * buf , void * * data , int rw );
525+ int hfsplus_submit_bio (struct super_block * sb , sector_t sector , void * buf ,
526+ void * * data , int rw );
527+ int hfsplus_read_wrapper (struct super_block * sb );
517528
518529/* time macros */
519530#define __hfsp_mt2ut (t ) (be32_to_cpu(t) - 2082844800U)
0 commit comments