[Ocfs2-commits] jlbec commits r952 - in trunk/src: . inc
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu May 27 06:10:43 CDT 2004
Author: jlbec
Date: 2004-05-27 05:10:41 -0500 (Thu, 27 May 2004)
New Revision: 952
Modified:
trunk/src/dir.c
trunk/src/inc/proto.h
trunk/src/namei.c
Log:
Header cleanup 1. proto.h is cleaned up and is ready to become the
end of ocfs.h.
Modified: trunk/src/dir.c
===================================================================
--- trunk/src/dir.c 2004-05-27 02:26:31 UTC (rev 951)
+++ trunk/src/dir.c 2004-05-27 10:10:41 UTC (rev 952)
@@ -230,7 +230,7 @@
/*
* routine to check that the specified directory is empty (for rmdir)
*/
-int empty_dir (struct inode * inode)
+int empty_dir(struct inode *inode)
{
unsigned long offset;
struct buffer_head * bh;
Modified: trunk/src/inc/proto.h
===================================================================
--- trunk/src/inc/proto.h 2004-05-27 02:26:31 UTC (rev 951)
+++ trunk/src/inc/proto.h 2004-05-27 10:10:41 UTC (rev 952)
@@ -27,85 +27,163 @@
#ifndef _PROTO_H_
#define _PROTO_H_
-int ocfs_allocate_extent (ocfs_super * osb, struct buffer_head *fe_bh, ocfs_journal_handle *handle,__u64 actualDiskOffset, __u64 actualLength, struct inode *inode);
-int ocfs_free_extents_for_truncate (ocfs_super * osb, ocfs_file_entry * FileEntry, ocfs_journal_handle *handle, struct inode *inode);
-int ocfs_lookup_file_allocation (ocfs_super * osb, __s64 Vbo, __s64 * Lbo, __u32 sectors, u32 *sector_count, struct inode *inode);
-int ocfs_get_leaf_extent (ocfs_super * osb, ocfs_file_entry * FileEntry, __s64 Vbo, struct buffer_head **data_extent_bh, struct inode *inode);
-int ocfs_find_contiguous_space_from_bitmap (ocfs_super * osb, ocfs_journal_handle *handle, __u64 file_size, __u64 * cluster_off, __u64 * cluster_count,int sysfile, struct buffer_head *lock_bh, struct inode *bitmap_inode);
-int ocfs_alloc_node_block (ocfs_super * osb, __u64 FileSize, __u64 * DiskOffset, __u64 * file_off, __u32 NodeNum, __u32 Type, ocfs_journal_handle *handle);
-int ocfs_free_file_extents (ocfs_super * osb, struct buffer_head *fe_bh, ocfs_journal_handle *handle, struct inode *inode);
+/* alloc.c */
+int ocfs_add_to_bitmap_free_head(ocfs_super *osb,
+ ocfs_bitmap_free_head *f,
+ __u32 len, __u32 fileoff,
+ __u32 nodenum, __u32 type);
+int ocfs_allocate_extent(ocfs_super *osb, struct buffer_head *fe_bh,
+ ocfs_journal_handle *handle,
+ __u64 actualDiskOffset, __u64 actualLength,
+ struct inode *inode);
+int ocfs_alloc_node_block(ocfs_super *osb, __u64 FileSize,
+ __u64 *DiskOffset, __u64 *file_off,
+ __u32 NodeNum, __u32 Type,
+ ocfs_journal_handle *handle);
+int ocfs_find_contiguous_space_from_bitmap(ocfs_super *osb,
+ ocfs_journal_handle *handle,
+ __u64 file_size,
+ __u64 *cluster_off,
+ __u64 *cluster_count,
+ int sysfile,
+ struct buffer_head *lock_bh,
+ struct inode *bitmap_inode);
+int ocfs_find_space(ocfs_super *osb, __u64 file_size,
+ __u64 *cluster_off, __u64 *cluster_count,
+ int sysfile, ocfs_journal_handle *handle);
+int ocfs_free_extents_for_truncate(ocfs_super *osb,
+ ocfs_file_entry *FileEntry,
+ ocfs_journal_handle *handle,
+ struct inode *inode);
+int ocfs_free_file_extents(ocfs_super *osb, struct buffer_head *fe_bh,
+ ocfs_journal_handle *handle,
+ struct inode *inode);
+int ocfs_get_leaf_extent(ocfs_super *osb, ocfs_file_entry *FileEntry,
+ __s64 Vbo, struct buffer_head **data_extent_bh,
+ struct inode *inode);
+int ocfs_load_local_alloc(ocfs_super *osb);
+int ocfs_lookup_file_allocation(ocfs_super *osb, __s64 Vbo,
+ __s64 *Lbo, __u32 sectors,
+ u32 *sector_count, struct inode *inode);
+int ocfs_process_bitmap_free_head(ocfs_super *osb,
+ ocfs_bitmap_free_head *f);
+int ocfs_recover_local_alloc(ocfs_super *osb, int node_num);
+void ocfs_shutdown_local_alloc(ocfs_super *osb,
+ struct buffer_head **local_alloc_bh,
+ int sync,
+ int in_recovery);
-int ocfs_lookup_obj_for_proc (ocfs_vote_obj *obj, ocfs_vote_obj_lookup_data *data);
-int ocfs_lookup_obj_by_lockid (ocfs_vote_obj *obj, ocfs_vote_obj_lookup_data *data);
-int ocfs_lookup_vote_request_obj (ocfs_super *osb, ocfs_vote_obj_lookup_data *data);
+/* bitmap.c */
+int ocfs_count_bits(ocfs_alloc_bm *bitmap);
+void ocfs_clear_bits(ocfs_journal_handle *handle,
+ ocfs_alloc_bm *bitmap,
+ __u32 start, __u32 num);
+int ocfs_find_clear_bits(ocfs_super *osb, ocfs_alloc_bm *bitmap,
+ __u32 numBits, __u32 offset, __u32 sysonly);
+void ocfs_initialize_bitmap(ocfs_alloc_bm *bitmap, __u32 validbits,
+ __u32 allocbits);
+void ocfs_reinitialize_bitmap(ocfs_alloc_bm *bitmap, __u32 validbits,
+ __u32 allocbits);
+void ocfs_set_bits(ocfs_journal_handle *handle, ocfs_alloc_bm *bitmap,
+ __u32 start, __u32 num);
+void ocfs_uninitialize_bitmap(ocfs_alloc_bm *bitmap);
+/* dcache.c */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+int ocfs_dentry_revalidate(struct dentry *dentry, struct nameidata *nd);
+#else
+int ocfs_dentry_revalidate(struct dentry *dentry, int flags);
+#endif
+int ocfs_empty(struct dentry *dentry);
+int ocfs_foreach_child(struct dentry *dentry,
+ int (*func)(struct dentry *, void *),
+ void *data);
-int ocfs_update_lockres (ocfs_super * osb, __u64 lock_id, struct buffer_head **bh, __u32 * updated, __u32 timeout, struct inode *inode, int reread, int locked);
-int ocfs_acquire_lockres (ocfs_lock_res * lockres, __u32 timeout);
-void ocfs_release_lockres (ocfs_lock_res * lockres);
-void ocfs_init_lockres (ocfs_super * osb, struct inode *inode);
-int ocfs_acquire_lock (ocfs_super * osb, __u64 lock_id, __u32 lock_type, __u32 flags, struct buffer_head **bh, struct inode *inode);
-int ocfs_release_lock (ocfs_super * osb, __u64 lock_id, __u32 lock_type, __u32 flags, struct buffer_head *bh, struct inode *inode);
+/* dir.c */
+int empty_dir(struct inode *inode); /* FIXME: to namei.c */
+int ocfs_find_files_on_disk(ocfs_super *osb, struct dentry *dentry,
+ struct buffer_head **fe_bh,
+ struct inode *inode,
+ struct inode *file_inode, int take_lock,
+ struct buffer_head **dirent_bh,
+ struct ocfs2_dir_entry **dirent);
+int ocfs_readdir(struct file *filp, void *dirent, filldir_t filldir);
-int new_lock_function(ocfs_super * osb, __u32 requested_lock, __u32 flags, struct buffer_head *bh,int *disk_vote, struct inode *inode);
-void ocfs_process_one_vote_reply(ocfs_super *osb, ocfs_vote_reply_ctxt *ctxt, __u32 node_num);
-int ocfs_break_cache_lock_zap_buffers(ocfs_super * osb, struct inode * inode);
-void ocfs_compute_dlm_stats(int status, int vote_status, ocfs_dlm_stats *stats);
-int ocfs_update_disk_lock (ocfs_super * osb, __u32 flags, struct buffer_head **bh, struct inode *inode, ocfs_journal_handle *handle);
-int ocfs_wait_for_lock_release (ocfs_super * osb, __u64 offset, __u32 time_to_wait, __u32 lock_type, struct inode *inode);
-int ocfs_update_master_on_open (ocfs_super * osb, struct inode *inode, ocfs_journal_handle *handle);
+/* dlm.c */
+int new_lock_function(ocfs_super *osb, __u32 requested_lock,
+ __u32 flags, struct buffer_head *bh,
+ int *disk_vote, struct inode *inode);
+int ocfs_acquire_lock(ocfs_super *osb, __u64 lock_id, __u32 lock_type,
+ __u32 flags, struct buffer_head **bh,
+ struct inode *inode);
+int ocfs_break_cache_lock_zap_buffers(ocfs_super *osb,
+ struct inode *inode);
+void ocfs_compute_dlm_stats(int status, int vote_status,
+ ocfs_dlm_stats *stats);
+int ocfs_release_lock(ocfs_super *osb, __u64 lock_id, __u32 lock_type,
+ __u32 flags, struct buffer_head *bh,
+ struct inode *inode);
+int ocfs_update_disk_lock(ocfs_super *osb, __u32 flags,
+ struct buffer_head **bh, struct inode *inode,
+ ocfs_journal_handle *handle);
+int ocfs_update_master_on_open(ocfs_super *osb, struct inode *inode,
+ ocfs_journal_handle *handle);
+int ocfs_wait_for_lock_release(ocfs_super *osb, __u64 offset,
+ __u32 time_to_wait, __u32 lock_type,
+ struct inode *inode);
-int ocfs_extend_system_file (ocfs_super * osb, __u32 FileId, __u64 FileSize, struct buffer_head *fe_bh, ocfs_journal_handle *handle,int zero);
+/* extmap.c */
+int ocfs_add_extent_map_entry(ocfs_super *osb, ocfs_extent_map *Map,
+ __s64 Vbo, __s64 Lbo, __u64 ByteCount);
+void ocfs_delete_all_extent_maps(ocfs_super *osb, struct inode *oin);
+void ocfs_extent_map_destroy(ocfs_extent_map *map);
+void ocfs_extent_map_init(ocfs_extent_map *map);
+int ocfs_get_next_extent_map_entry(ocfs_super *osb,
+ ocfs_extent_map *Map, __u32 RunIndex,
+ __s64 *Vbo, __s64 *Lbo,
+ __u32 *SectorCount);
+int ocfs_lookup_extent_map_entry(ocfs_super *osb, ocfs_extent_map *Map,
+ __s64 Vbo, __s64 *Lbo,
+ __u64 *SectorCount, __u32 *Index);
+int ocfs_update_extent_map(ocfs_super *osb, ocfs_extent_map *Map,
+ void *Buffer, __s64 *localVbo,
+ __u64 *remainingLength, ocfs_ext_flag Flag);
-void ocfs_extent_map_init (ocfs_extent_map * map);
-void ocfs_extent_map_destroy (ocfs_extent_map * map);
-void ocfs_delete_all_extent_maps (ocfs_super * osb, struct inode * oin);
-int ocfs_get_next_extent_map_entry (ocfs_super * osb, ocfs_extent_map * Map, __u32 RunIndex, __s64 * Vbo, __s64 * Lbo, __u32 * SectorCount);
-int ocfs_lookup_extent_map_entry (ocfs_super * osb, ocfs_extent_map * Map, __s64 Vbo, __s64 * Lbo, __u64 * SectorCount, __u32 * Index);
-int ocfs_update_extent_map (ocfs_super * osb, ocfs_extent_map * Map, void *Buffer, __s64 * localVbo, __u64 * remainingLength, ocfs_ext_flag Flag);
-int ocfs_add_extent_map_entry (ocfs_super * osb, ocfs_extent_map * Map, __s64 Vbo, __s64 Lbo, __u64 ByteCount);
-
-
-
-int ocfs_file_open (struct inode *inode, struct file *file);
-int ocfs_file_release (struct inode *inode, struct file *file);
-int ocfs_flush (struct file *file);
-int ocfs_sync_file (struct file *file, struct dentry *dentry, int datasync);
-ssize_t ocfs_file_write (struct file *filp, const char *buf, size_t count, loff_t * ppos);
-ssize_t ocfs_file_read (struct file *filp, char *buf, size_t count, loff_t * ppos);
-int ocfs_extend_file (ocfs_super * osb, __u64 file_size, __u64 file_off, ocfs_journal_handle *passed_handle, struct inode *inode, struct iattr *attr);
-int ocfs_setattr (struct dentry *dentry, struct iattr *attr);
+/* file.c */
+int ocfs_extend_file(ocfs_super *osb, __u64 file_size, __u64 file_off,
+ ocfs_journal_handle *passed_handle,
+ struct inode *inode, struct iattr *attr);
+int ocfs_file_open(struct inode *inode, struct file *file);
+ssize_t ocfs_file_read(struct file *filp, char *buf, size_t count,
+ loff_t * ppos);
+int ocfs_file_release(struct inode *inode, struct file *file);
+ssize_t ocfs_file_write(struct file *filp, const char *buf,
+ size_t count, loff_t *ppos);
+int ocfs_flush(struct file *file);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-int ocfs_getattr (struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
+int ocfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
+ struct kstat *stat);
#else
-int ocfs_getattr (struct dentry *dentry, struct iattr *attr);
+int ocfs_getattr(struct dentry *dentry, struct iattr *attr);
#endif
+int ocfs_inode_fill_ext_map(ocfs_super *osb, struct buffer_head *fe_bh,
+ struct inode *inode);
+int ocfs_inode_notify_open(ocfs_super *osb, struct buffer_head *fe_bh,
+ ocfs_journal_handle *handle,
+ struct inode *inode);
+int ocfs_setattr(struct dentry *dentry, struct iattr *attr);
+int ocfs_sync_file(struct file *file, struct dentry *dentry, int datasync);
-int ocfs_inode_init_private(struct inode *inode);
-void ocfs_populate_inode (struct inode *inode, ocfs_file_entry *fe, umode_t mode,int create_ino);
-void ocfs_read_inode2 (struct inode *inode, void *opaque);
-void ocfs_read_inode (struct inode *inode);
-void ocfs_put_inode (struct inode *inode);
-void ocfs_clear_inode (struct inode *inode);
-int ocfs_block_symlink (struct inode *inode, const char *symname, int len);
-ssize_t ocfs_rw_direct (int rw, struct file *filp, char *buf, size_t size, loff_t * offp);
-struct buffer_head *ocfs_bread(ocfs_journal_handle *handle, struct inode * inode,
- int block, int create, int *err, int reada);
-
-
-int ocfs_submit_vol_metadata(ocfs_super *osb, ocfs_offset_map *map_buf, __u32 num);
-int ocfs_commit_thread(void *arg);
-
+/* hash.c */
+int ocfs_bh_sem_hash_cleanup_pid(pid_t pid);
+int ocfs_bh_sem_hash_destroy(void);
int ocfs_bh_sem_hash_init(void);
-int ocfs_bh_sem_hash_destroy(void);
int ocfs_bh_sem_hash_prune(void);
int ocfs_bh_sem_hash_prune_all(void);
int ocfs_bh_sem_lock(struct buffer_head *bh);
int ocfs_bh_sem_unlock(struct buffer_head *bh);
-int ocfs_bh_sem_hash_cleanup_pid(pid_t pid);
-void wait_on_buffer_modified(struct buffer_head * bh);
void ocfs_clear_buffer_modified(struct buffer_head *bh);
-
+void wait_on_buffer_modified(struct buffer_head *bh);
#ifdef BH_SEM_DEBUG
#define ocfs_bh_sem_lock_modify(bh) ({ \
ocfs_bh_sem *sem; \
@@ -138,142 +216,164 @@
#endif
+/* heartbeat.c */
+int ocfs_nm_heart_beat(ocfs_super *osb, __u32 flag, int read_publish);
+void ocfs_update_publish_map(ocfs_super *osb, struct buffer_head *bhs[],
+ int first_time);
-void ocfs_version_print (void);
-
-
-void ocfs_daemonize (char *name, int len);
-int ocfs_sleep (__u32 ms);
-void *ocfs_dbg_slab_alloc (kmem_cache_t *slab, char *file, int line);
-void ocfs_dbg_slab_free (kmem_cache_t *slab, void *m);
-void *ocfs_linux_dbg_alloc (int Size, char *file, int line);
-void ocfs_linux_dbg_free (const void *Buffer);
-
-
-int ocfs_verify_update_inode (ocfs_super * osb, struct inode * inode, int *needs_trunc, int lockres_locked);
-int ocfs_inode_fill_ext_map(ocfs_super * osb, struct buffer_head * fe_bh, struct inode *inode);
-int ocfs_inode_notify_open(ocfs_super *osb, struct buffer_head *fe_bh,
- ocfs_journal_handle *handle, struct inode *inode);
-
-int ocfs_initialize_osb (ocfs_super * osb, ocfs_vol_disk_hdr * vdh, ocfs_vol_label * vol_label, __u32 sect_size);
-int ocfs_verify_volume (ocfs_vol_disk_hdr * vdh);
-int ocfs_check_volume (ocfs_super * osb);
-void ocfs_delete_osb (ocfs_super * osb);
-int ocfs_create_root_dir_node (ocfs_super * osb);
-int ocfs_dismount_volume (struct super_block *sb);
-
-int ocfs_proc_init (void);
-void ocfs_proc_deinit (void);
-void ocfs_proc_add_volume (ocfs_super * osb);
-void ocfs_proc_remove_volume (ocfs_super * osb);
-
+/* inode.c */
+int ocfs_block_symlink(struct inode *inode, const char *symname,
+ int len);
+struct buffer_head *ocfs_bread(ocfs_journal_handle *handle,
+ struct inode * inode, int block,
+ int create, int *err, int reada);
+void ocfs_clear_inode(struct inode *inode);
+struct inode *ocfs_iget(ocfs_super *osb, __u64 feoff,
+ struct buffer_head *fe_bh);
+int ocfs_inode_init_private(struct inode *inode);
+int ocfs_inode_revalidate(struct dentry *dentry);
+void ocfs_populate_inode(struct inode *inode, ocfs_file_entry *fe,
+ umode_t mode, int create_ino);
+void ocfs_put_inode(struct inode *inode);
+void ocfs_read_inode(struct inode *inode);
+void ocfs_read_inode2(struct inode *inode, void *opaque);
+ssize_t ocfs_rw_direct(int rw, struct file *filp, char *buf,
+ size_t size, loff_t *offp);
void ocfs_sync_blockdev(struct super_block *sb);
-int ocfs_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);
-int ocfs_nm_heart_beat (ocfs_super * osb, __u32 flag,int read_publish);
-void ocfs_update_publish_map (ocfs_super * osb, struct buffer_head *bhs[],int first_time);
+int ocfs_verify_update_inode(ocfs_super *osb, struct inode *inode,
+ int *needs_trunc, int lockres_locked);
+/* ioctl.c */
+int ocfs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
+ unsigned long arg);
-int ocfs_send_dlm_request_msg (ocfs_super * osb, __u64 lock_id, __u32 lock_type, __u32 flags, __u64 * vote_map, __u64 *openmap, struct inode *inode, int *vote_status);
-int ocfs_recv_thread (void *unused);
-int ocfs_volume_thread (void *arg);
-int ocfs_init_udp_sock (struct socket **send_sock, struct socket **recv_sock);
-int ocfs_recv_udp_msg (ocfs_recv_ctxt * recv_ctxt);
-int ocfs_send_dismount_msg (ocfs_super * osb, __u64 vote_map);
-int ocfs_send_vote_reply (ocfs_super * osb, ocfs_dlm_msg * dlm_msg, __u32 vote_status,int inode_open);
-int ocfs_drop_readonly_cache_lock(ocfs_super *osb, struct inode *inode,int yield);
+/* journal.c */
+int ocfs_commit_thread(void *arg);
+/* lockres.c */
+int ocfs_acquire_lockres(ocfs_lock_res *lockres, __u32 timeout);
+void ocfs_init_lockres(ocfs_super *osb, struct inode *inode);
+void ocfs_release_lockres(ocfs_lock_res *lockres);
+int ocfs_update_lockres(ocfs_super *osb, __u64 lock_id,
+ struct buffer_head **bh, __u32 *updated,
+ __u32 timeout, struct inode *inode, int reread,
+ int locked);
-void ocfs_initialize_bitmap (ocfs_alloc_bm * bitmap, __u32 validbits, __u32 allocbits);
-void ocfs_uninitialize_bitmap(ocfs_alloc_bm * bitmap);
-void ocfs_reinitialize_bitmap(ocfs_alloc_bm *bitmap, __u32 validbits, __u32 allocbits);
-int ocfs_find_clear_bits (ocfs_super *osb, ocfs_alloc_bm * bitmap, __u32 numBits, __u32 offset, __u32 sysonly);
-int ocfs_count_bits (ocfs_alloc_bm * bitmap);
-void ocfs_set_bits (ocfs_journal_handle *handle, ocfs_alloc_bm * bitmap, __u32 start, __u32 num);
-void ocfs_clear_bits (ocfs_journal_handle *handle, ocfs_alloc_bm * bitmap, __u32 start, __u32 num);
-
-int ocfs_get_config (ocfs_super * osb);
-int ocfs_chk_update_config (ocfs_super * osb);
-
-int ocfs_read_system_file (ocfs_super * osb, __u32 FileId, struct buffer_head *bhs[], __u64 Length, __u64 Offset);
-int ocfs_get_system_file_size (ocfs_super * osb, __u32 FileId, __u64 * Length, __u64 * AllocSize);
-__u64 ocfs_file_to_disk_off (ocfs_super * osb, __u32 FileId, __u64 Offset);
-
-int ocfs_compare_qstr (struct qstr * s1, struct qstr * s2);
-void ocfs_truncate_inode_pages(struct inode *inode, loff_t off);
-
-int ocfs_process_bitmap_free_head(ocfs_super *osb, ocfs_bitmap_free_head *f);
-int ocfs_add_to_bitmap_free_head(ocfs_super *osb,
- ocfs_bitmap_free_head *f,
- __u32 len, __u32 fileoff,
- __u32 nodenum, __u32 type);
-
-
-int ocfs_empty (struct dentry *dentry);
+/* namei.c */
+int ocfs_check_dir_entry (struct inode *dir,
+ struct ocfs2_dir_entry *de,
+ struct buffer_head *bh, unsigned long offset);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-int ocfs_dentry_revalidate (struct dentry *dentry, struct nameidata *nd);
+int ocfs_create (struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd);
#else
-int ocfs_dentry_revalidate (struct dentry *dentry, int flags);
+int ocfs_create (struct inode *dir, struct dentry *dentry, int mode);
#endif
-int ocfs_foreach_child (struct dentry *dentry, int (*func)(struct dentry *, void *), void *data);
-int ocfs_readdir (struct file *filp, void *dirent, filldir_t filldir);
+struct buffer_head *ocfs_find_entry(struct dentry *dentry,
+ struct ocfs2_dir_entry **res_dir);
+int ocfs_link(struct dentry *old_dentry, struct inode *dir,
+ struct dentry *dentry);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-struct dentry *ocfs_lookup (struct inode *dir, struct dentry *dentry, struct nameidata *nd);
+struct dentry *ocfs_lookup(struct inode *dir, struct dentry *dentry,
+ struct nameidata *nd);
#else
-struct dentry *ocfs_lookup (struct inode *dir, struct dentry *dentry);
+struct dentry *ocfs_lookup(struct inode *dir, struct dentry *dentry);
#endif
-int ocfs_mknod (struct inode *dir, struct dentry *dentry, int mode, ocfs_dev dev);
-int ocfs_mkdir (struct inode *dir, struct dentry *dentry, int mode);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-int ocfs_create (struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd);
-#else
-int ocfs_create (struct inode *dir, struct dentry *dentry, int mode);
-#endif
-int ocfs_link (struct dentry *old_dentry, struct inode *dir, struct dentry *dentry);
-int ocfs_unlink (struct inode *dir, struct dentry *dentry);
-int ocfs_rename (struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry);
-int ocfs_symlink (struct inode *dir, struct dentry *dentry, const char *symname);
+int ocfs_mkdir(struct inode *dir, struct dentry *dentry, int mode);
+int ocfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
+ ocfs_dev dev);
+int ocfs_rename(struct inode *old_dir, struct dentry *old_dentry,
+ struct inode *new_dir, struct dentry *new_dentry);
+int ocfs_symlink(struct inode *dir, struct dentry *dentry,
+ const char *symname);
+int ocfs_unlink(struct inode *dir, struct dentry *dentry);
-int ocfs_find_files_on_disk (ocfs_super * osb, struct dentry * dentry, struct buffer_head ** fe_bh, struct inode *inode, struct inode *file_inode, int take_lock, struct buffer_head **dirent_bh, struct ocfs2_dir_entry **dirent);
-int ocfs_write_force_dir_node (ocfs_super * osb, struct buffer_head *bhs[], __s32 idx);
-int ocfs_recover_dir_node (ocfs_super * osb, __u64 OrigDirNodeOffset, __u64 SavedDirNodeOffset);
+/* FIXME: only in namei.c */
+int ocfs_orphan_add(ocfs_journal_handle *handle, struct inode *inode);
+int ocfs_orphan_del(ocfs_journal_handle *handle, struct inode *inode);
+/* nm.c */
+int ocfs_drop_readonly_cache_lock(ocfs_super *osb, struct inode *inode,
+ int yield);
+void ocfs_inc_inode_seq(ocfs_super *osb, struct inode *inode,
+ int sync_buffers);
+int ocfs_process_vote(ocfs_super *osb, ocfs_vote_request_ctxt *ctxt);
+int ocfs_recv_thread(void *unused);
+void ocfs_recover_oin_locks(ocfs_super *osb, __u32 node_num);
+int ocfs_volume_thread(void *arg);
+/* osb.c */
+/* FIXME: should fold osb.c into super.c */
+int ocfs_check_volume(ocfs_super *osb);
+void ocfs_delete_osb(ocfs_super *osb);
+int ocfs_initialize_osb(ocfs_super *osb, ocfs_vol_disk_hdr *vdh,
+ ocfs_vol_label *vol_label, __u32 sect_size);
+int ocfs_verify_volume(ocfs_vol_disk_hdr *vdh);
-void ocfs_recover_oin_locks(ocfs_super *osb, __u32 node_num);
-int ocfs_process_vote (ocfs_super * osb, ocfs_vote_request_ctxt *ctxt);
-void ocfs_inc_inode_seq(ocfs_super *osb, struct inode *inode,int sync_buffers);
+/* proc.c */
+void ocfs_proc_add_volume(ocfs_super *osb);
+void ocfs_proc_deinit(void);
+int ocfs_proc_init(void);
+void ocfs_proc_remove_volume(ocfs_super *osb);
+/* super.c */
+int ocfs_dismount_volume(struct super_block *sb);
+/* symlink.c */
int ocfs_follow_link(struct dentry *dentry, struct nameidata *nd);
-int ocfs_create_new_local_alloc(ocfs_super *osb, int node_num);
-int ocfs_load_local_alloc(ocfs_super *osb);
-void ocfs_shutdown_local_alloc(ocfs_super *osb,
- struct buffer_head **local_alloc_bh,
- int sync,
- int in_recovery);
-int ocfs_find_space(ocfs_super * osb, __u64 file_size, __u64 * cluster_off, __u64 * cluster_count,int sysfile, ocfs_journal_handle *handle);
-int ocfs_recover_local_alloc(ocfs_super *osb, int node_num);
+/* sysfile.c */
+int ocfs_extend_system_file(ocfs_super *osb, __u32 FileId,
+ __u64 FileSize, struct buffer_head *fe_bh,
+ ocfs_journal_handle *handle,int zero);
+__u64 ocfs_file_to_disk_off(ocfs_super *osb, __u32 FileId,
+ __u64 Offset);
+int ocfs_get_system_file_size(ocfs_super *osb, __u32 FileId,
+ __u64 *Length, __u64 *AllocSize);
+int ocfs_read_system_file (ocfs_super *osb, __u32 FileId,
+ struct buffer_head *bhs[], __u64 Length,
+ __u64 Offset);
+/* util.c */
+int ocfs_compare_qstr(struct qstr *s1, struct qstr *s2);
+void ocfs_clear_timeout(ocfs_timeout *to);
+void ocfs_daemonize(char *name, int len);
+void *ocfs_dbg_slab_alloc(kmem_cache_t *slab, char *file, int line);
+void ocfs_dbg_slab_free(kmem_cache_t *slab, void *m);
void ocfs_end_buffer_io_sync(struct buffer_head *bh, int uptodate);
-
-struct inode *ocfs_iget(ocfs_super *osb, __u64 feoff,
- struct buffer_head *fe_bh);
-
void ocfs_init_timeout(ocfs_timeout *to);
+void *ocfs_linux_dbg_alloc(int Size, char *file, int line);
+void ocfs_linux_dbg_free(const void *Buffer);
void ocfs_set_timeout(ocfs_timeout *to, __u32 timeout);
-void ocfs_clear_timeout(ocfs_timeout *to);
-void ocfs_show_stack(unsigned long * esp);
-void ocfs_show_trace(unsigned long * stack);
+void ocfs_show_stack(unsigned long *esp);
+void ocfs_show_trace(unsigned long *stack);
+int ocfs_sleep(__u32 ms);
+void ocfs_truncate_inode_pages(struct inode *inode, loff_t off);
-void ocfs_get_vote_obj (ocfs_vote_obj *obj);
+/* ver.c */
+void ocfs_version_print(void);
-int ocfs_inode_revalidate(struct dentry *dentry);
+/* volcfg.c */
+int ocfs_chk_update_config(ocfs_super *osb);
+int ocfs_get_config(ocfs_super *osb);
-struct buffer_head * ocfs_find_entry (struct dentry *dentry, struct ocfs2_dir_entry ** res_dir);
-int ocfs_check_dir_entry (struct inode * dir, struct ocfs2_dir_entry * de, struct buffer_head * bh, unsigned long offset);
-int empty_dir (struct inode * inode);
-int ocfs_orphan_add(ocfs_journal_handle *handle, struct inode *inode);
-int ocfs_orphan_del(ocfs_journal_handle *handle, struct inode *inode);
+/* vote.c */
+void ocfs_get_vote_obj(ocfs_vote_obj *obj);
+int ocfs_init_udp_sock(struct socket **send_sock,
+ struct socket **recv_sock);
+int ocfs_lookup_obj_for_proc(ocfs_vote_obj *obj,
+ ocfs_vote_obj_lookup_data *data);
+int ocfs_lookup_obj_by_lockid(ocfs_vote_obj *obj,
+ ocfs_vote_obj_lookup_data *data);
+void ocfs_process_one_vote_reply(ocfs_super *osb,
+ ocfs_vote_reply_ctxt *ctxt,
+ __u32 node_num);
+int ocfs_recv_udp_msg(ocfs_recv_ctxt *recv_ctxt);
+int ocfs_send_dismount_msg(ocfs_super *osb, __u64 vote_map);
+int ocfs_send_dlm_request_msg(ocfs_super *osb, __u64 lock_id,
+ __u32 lock_type, __u32 flags,
+ __u64 *vote_map, __u64 *openmap,
+ struct inode *inode, int *vote_status);
+int ocfs_send_vote_reply(ocfs_super *osb, ocfs_dlm_msg *dlm_msg,
+ __u32 vote_status, int inode_open);
#endif /* _PROTO_H_ */
Modified: trunk/src/namei.c
===================================================================
--- trunk/src/namei.c 2004-05-27 02:26:31 UTC (rev 951)
+++ trunk/src/namei.c 2004-05-27 10:10:41 UTC (rev 952)
@@ -58,9 +58,10 @@
*
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-struct dentry *ocfs_lookup (struct inode *dir, struct dentry *dentry, struct nameidata *nd)
+struct dentry *ocfs_lookup(struct inode *dir, struct dentry *dentry,
+ struct nameidata *nd)
#else
-struct dentry *ocfs_lookup (struct inode *dir, struct dentry *dentry)
+struct dentry *ocfs_lookup(struct inode *dir, struct dentry *dentry)
#endif
{
int status;
@@ -1200,11 +1201,11 @@
if (old_dir != new_dir) {
if (new_dir_nlink != new_dir->i_nlink)
LOG_ERROR_ARGS("need to change nlink for new dir %llu from %d to %d\n",
- GET_INODE_FEOFF(new_dir), new_dir_nlink, new_dir->i_nlink);
+ GET_INODE_FEOFF(new_dir), (int)new_dir_nlink, new_dir->i_nlink);
}
if (old_dir_nlink != old_dir->i_nlink)
LOG_ERROR_ARGS("need to change nlink for old dir %llu from %d to %d\n",
- GET_INODE_FEOFF(old_dir), old_dir_nlink, old_dir->i_nlink);
+ GET_INODE_FEOFF(old_dir), (int)old_dir_nlink, old_dir->i_nlink);
/* commit_trans */
ocfs_commit_trans(handle);
More information about the Ocfs2-commits
mailing list