Classes | Files | Defines | Typedefs | Functions | Variables

Linux File System Filter
[Client]

Collaboration diagram for Linux File System Filter:

Classes

struct  ivd_fs_ops_t
struct  ivd_fs_b_ops_t
struct  ivd_fs_t
struct  ivd_comm_t
struct  ivd_req_entry_t
struct  ivd_inode_info_t
struct  ivd_file_t
struct  ivd_path_t
struct  ivd_req_hdr_t
struct  ivd_req_pre_mount_t
struct  ivd_req_mount_t
struct  ivd_req_pre_umount_t
struct  ivd_req_umount_t
struct  ivd_req_open_t
struct  ivd_req_release_t
struct  ivd_req_chg_name_t
struct  ivd_req_chg_data_t
struct  ivd_req_chg_attr_t
struct  ivd_req_data_offl_t
struct  ivd_req_cancel_req_t
struct  ivd_req_log_error_t
union  ivd_req_t
struct  ivd_ioc_opmode_t
struct  ivd_ioc_setfileid_t
 HSM_IOC_GET_FILEID argument for ioctl() call HSM_IOC_SET_FILEID argument for ioctl() call. More...
struct  ivd_ioc_lockfile_t
struct  ivd_ioc_fileinfo_t
 HSM_IOC_GET_FILE_INFO argument for ioctl() call. More...
struct  ivd_ioc_datastate_t
 HSM_IOC_DATA_CLEAN argument for ioctl() call HSM_IOC_DATA_OFFLINE argument for ioctl() call HSM_IOC_DATA_ONLINE argument for ioctl() call. More...
struct  ivd_ioc_triggevent_t
 HSM_IOC_TRIGGER_EVENT argument for ioctrl() call. More...

Files

file  ivdfs_params.c
 

The parameters are available as read (or read write) in the /sys/module/hsmfs/parameters.


file  ivdfs_super.h
 

All VFS operations can be found within structure super_operations in the file include/linux/fs.h.


Defines

#define IVD_CAP_EFFECTIVE   *(kernel_cap_t *)&current->cred->cap_effective
 Common module compilation defines.
#define IVD_OVERRIDE_ALL   1
 Common module compilation defines.
#define HSM_VIRTUAL_INODE_DIR   6
 special INODE for recalling files without DENTRY
#define IVD_BFS_NEEDS_USER_XATTR   0x0001
#define IVD_EF_SYNC   0x0001
#define IVD_EF_REPLY   0x0002
#define IVD_EF_NONBLOCK   0x0010
#define IVD_IIF_DIRTY   ia_F_DIRTY
 IVD Inode Info - record stored in each struct inode (stored in unused part of inode->u structure).
#define IVD_IIF_OFFLINE   ia_F_OFFLINE
#define IVD_IIF_LOCK_MIGRATION   (1 << 15)
#define IVD_IIF_LOCK_RECALL   (1 << 16)
#define IVD_IIF_LOCK_RELEASE   (1 << 17)
#define IVD_IIF_MASTER   (1 << 29)
#define IVD_IIF_CREATED   (1 << 30)
#define IVD_IIF_NEW_ENTRY   (1 << 31)
#define CHECK_INODE_ACCESS(_ic, _inode, _func)
#define CHECK_INODE_ACCESS_MOVE(_ic, _inode, _old_de, _new_de, _func)
#define CHECK_FILE_ACCESS(_ic, _inode, _file, _func)
#define CHECK_FILE_ATTR_DATA(_ic, _inode, _file)
#define MAX_FSTYPES   3
 maximum number of different FS types supported in single kernel
#define MAX_IVDFS   256
 maximum number of mounted hsmfs's
#define FSTYPE_SLEN   20
 maximum length of FS type string, i.e. ext3, reiserfs, intermezzo..
#define min(a, b)   (((a) < (b)) ? (a) : (b))
 min/max helpers
#define max(a, b)   (((a) > (b)) ? (a) : (b))
#define __TO_STR(x)   #x
 stringification macro
#define TO_STR(x)   __TO_STR(x)
#define DBG_MAIN   (1 << 0)
 main filter execution flow
#define DBG_FILTER   (1 << 1)
 file system filter
#define DBG_VFS   (1 << 2)
 tracing of VFS methods (all except page cache)
#define DBG_COMM   (1 << 3)
 pseudo device communication
#define DBG_EVT   (1 << 4)
 logging of events
#define DBG_II   (1 << 5)
 Inode info/HSM attributes.
#define DBG_LOCK   (1 << 6)
 locking
#define DBG_VFS_PAGE   (1 << 18)
 tracing of VFS methods (page cache)
#define DBG_COMM_DETAIL   (1 << 19)
 pseudo device communication - detail tracing
#define DBG_EVT_DETAIL   (1 << 20)
 logging of events - detail event structure dump
#define DBG_II_DETAIL   (1 << 21)
 Inode info/HSM attributes - detail tracing.
#define DBG_LOCK_DETAIL   (1 << 22)
 locking - detail tracing
#define DBG_INV_IO   (1 << 30)
 tracing of Invisible IO (all operations that are hidden)
#define DBG_VFS_ALL   (1 << 31)
 tracing of all VFS methods (even those that are not needed)
#define ivd_dbg(_lvl, _fmt, _arg...)
#define ivd_alert(_fmt, _arg...)   printk(KERN_ALERT "%s: " _fmt "\n", "hsmfs", ## _arg)
#define ivd_err(_fmt, _arg...)   printk(KERN_ERR "%-23s ERR: " _fmt "\n", __FUNCTION__, ## _arg)
#define ivd_warn(_fmt, _arg...)   printk(KERN_WARNING "%-23s WARN: " _fmt "\n", __FUNCTION__, ## _arg)
#define ivd_info(_fmt, _arg...)   printk(KERN_INFO "%s: " _fmt "\n", "hsmfs", ## _arg)
#define EIVDBUSY   EBUSY
#define IVD_MALLOC(ptr, cast, size)
 malloc/free
#define IVD_FREE(ptr)
#define ivd_ii(_inode)   ((ivd_inode_info_t *)(_inode->i_private))
#define IVD_EVT_HDR(_req, _evt, _dev)
#define OVERRIDE(_ivd_ops, _op, _func)
#define ivdfs_hsmattr_init(_ia)   memset(_ia, 0, sizeof(ivd_hsmattr_t))
 Initialize HSM attributes.
#define IVD_ISEM_HELD   0x0001
 Flags for locking and sending events.
#define IVD_DONT_WRITE   0x0002
#define IVD_KEEP_TIME   0x0004
#define ivdfs_is_offline(_inode, _off, _size)   (ivd_ii(_inode)->flags & IVD_IIF_OFFLINE)
 Check if area of file (off, size) is offline (released).
#define ivdfs_is_dirty(_inode, _off, _size)   (ivd_ii(_inode)->flags & IVD_IIF_DIRTY)
 Check if area of file (off, size) is dirty (changed from last migration).
#define HSM_DEVNAME   "hsmfs"
#define MAX_EVT_BUFSIZE   65536
#define MAX_DEVNAME   1024
#define IOPEN_DIR   ".hsmfsInode"
#define IOPEN_DIR_LEN   11
#define IVD_FILE_ID_FS(_ino, _gen)   (((UInt64_t)(_gen) << 32) + (_ino))
 ID of file in filesystem = inode number + generation number.
#define IVD_FILE_INO(_id_fs)   ((UInt32_t)(_id_fs & 0xFFFFFFFF))
#define IVD_FILE_GEN(_id_fs)   ((UInt32_t)(_id_fs >> 32))
#define IVD_PRINT_ID_FS(_id_fs)   IVD_FILE_INO(_id_fs) << " (" << IVD_FILE_GEN(_id_fs) << ")"
#define ROUND_UP(x, n)   (((x)+(n)-1) & ~((n)-1))
#define ALIGN_FILE(x)   ROUND_UP(x,8)
#define HSM_CAUSE_OFFLINE   0
#define HSM_CAUSE_RECALL   1
#define HSM_CAUSE_MIGRATE   2
#define HSM_EVT_UNKNOWN   0
 IVD request/event types.
#define HSM_EVT_PRE_MOUNT   1
 mount of ivdfs requested [sync]
#define HSM_EVT_MOUNT   2
 ivdfs successfully mounted
#define HSM_EVT_PRE_UMOUNT   3
 umount of ivdfs requested [sync]
#define HSM_EVT_UMOUNT   4
 ivdfs successfully umounted
#define HSM_EVT_OPEN   5
 file opened
#define HSM_EVT_RELEASE   6
 file released (last close)
#define HSM_EVT_CHG_NAME   7
 Change of name (create/rename/move/remove).
#define HSM_EVT_CHG_DATA   8
 Change of file data.
#define HSM_EVT_CHG_ATTR   9
 Change of file attributes.
#define HSM_EVT_CHG_META   10
 Change of file meta data (EA, ACL...).
#define HSM_EVT_DATA_OFFL   11
 Data of file is offline - recall required [sync].
#define HSM_EVT_CANCEL_REQ   12
 Cancel timeouted sync request.
#define HSM_EVT_LOG_ERROR   13
 Write error to log file.
#define HSM_OPMODE_REGULAR   0
 HSM_IOC_SET_OPMODE argument for ioctl() call.
#define HSM_OPMODE_WORM   1
#define HSM_OPMODE_READ_ONLY_NO_RECALL   2
#define HSM_OP_MIGRATION   1
 HSM_IOC_LOCK_FILE argument for ioctl() call HSM_IOC_UNLOCK_FILE argument for ioctl() call.
#define HSM_OP_RELEASE   2
#define HSM_IOC_MOD_COUNT   _IOW('I', 0x00, int)
 IVDFS ioctl() commands.
#define HSM_IOC_SET_DEBUG   _IOW('I', 0x01, unsigned short)
 Set debuging of FS Filter.
#define HSM_IOC_SET_TIMEOUT   _IOW('I', 0x02, unsigned short)
 Set timeout for syncronous events (in seconds).
#define HSM_IOC_DUMP_STATE   _IOW('I', 0x03, int)
 Dump current internal state of ivdfs.
#define HSM_IOC_SET_OPMODE   _IOW('I', 0x04, ivd_ioc_opmode_t *)
 Set operation mode regular/WORM/read-only-no-recall.
#define HSM_IOC_SET_INVIO_PID   _IOW('I', 0x05, int)
 Set PID for InvIO.
#define HSM_IOC_GET_FILEID   _IOW('I', 0x10, ivd_ioc_setfileid_t *)
 Get FileID and chunk size for existing file/dir/symlink.
#define HSM_IOC_SET_FILEID   _IOW('I', 0x11, ivd_ioc_setfileid_t *)
 Set FileID and chunk size for newly created file/dir/symlink.
#define HSM_IOC_LOCK_FILE   _IOW('I', 0x12, ivd_ioc_lockfile_t *)
 Lock file for migration/release.
#define HSM_IOC_UNLOCK_FILE   _IOW('I', 0x13, ivd_ioc_lockfile_t *)
 Unlock file for migration/release.
#define HSM_IOC_GET_FILE_INFO   _IOW('I', 0x14, ivd_ioc_fileinfo_t *)
 Get file information - EA.
#define HSM_IOC_DATA_CLEAN   _IOW('I', 0x20, ivd_ioc_datastate_t *)
 File data is clean (after migration).
#define HSM_IOC_DATA_OFFLINE   _IOW('I', 0x21, ivd_ioc_datastate_t *)
 File data is offline (after release).
#define HSM_IOC_DATA_ONLINE   _IOW('I', 0x22, ivd_ioc_datastate_t *)
 File data is online (after recall).
#define HSM_IOC_TRIGGER_EVENT   _IOW('I', 0x30, ivd_ioc_triggevent_t *)
 Force recall/migrate.
#define HSM_OK_REPLY_d   0
 OK status for replying.
#define HSM_ERR_REPLY_d   1
 ERROR status for replying.
#define HSM_ERR_HSM_CLOSED_d   2
 ERROR HSM released comm, but partition mounted.
#define HSM_ERR_BOTTOM_MOUNT_d   3
 ERROR could not mount bottom file system.
#define HSM_WRN_HSM_BUSY_d   4
 WARNING HSM stoped or slowed read comm, but partition mounted.
#define ivdfs_MAX_HSM_BUSY_d   10
#define ivdfs_SLEEP_FACTOR_d   200
#define ivdfs_MAX_SLEEP_TIME_d   2
#define ivdfs_IMPORT_DELAY_d   1
#define ivdfs_CHG_DATA_INTERVAL_d   1
#define ivdfs_EVENT_ALERT_d   50000
#define ivdfs_PATH_BUFSIZE_d   (2*PAGE_SIZE)
#define ivdfs_NEW_ON_OPEN_NONE_d   0
#define ivdfs_NEW_ON_OPEN_FILES_d   1
#define ivdfs_NEW_ON_OPEN_ALL_d   2
#define HSM_DEVNAME   "hsmfs"
#define MAX_EVT_BUFSIZE   65536
#define MAX_DEVNAME   1024
#define IOPEN_DIR   ".hsmfsInode"
#define IOPEN_DIR_LEN   11
#define IVD_FILE_ID_FS(_ino, _gen)   (((UInt64_t)(_gen) << 32) + (_ino))
 ID of file in filesystem = inode number + generation number.
#define IVD_FILE_INO(_id_fs)   ((UInt32_t)(_id_fs & 0xFFFFFFFF))
#define IVD_FILE_GEN(_id_fs)   ((UInt32_t)(_id_fs >> 32))
#define IVD_PRINT_ID_FS(_id_fs)   IVD_FILE_INO(_id_fs) << " (" << IVD_FILE_GEN(_id_fs) << ")"
#define ROUND_UP(x, n)   (((x)+(n)-1) & ~((n)-1))
#define ALIGN_FILE(x)   ROUND_UP(x,8)
#define HSM_CAUSE_OFFLINE   0
#define HSM_CAUSE_RECALL   1
#define HSM_CAUSE_MIGRATE   2
#define HSM_EVT_UNKNOWN   0
 IVD request/event types.
#define HSM_EVT_PRE_MOUNT   1
 mount of ivdfs requested [sync]
#define HSM_EVT_MOUNT   2
 ivdfs successfully mounted
#define HSM_EVT_PRE_UMOUNT   3
 umount of ivdfs requested [sync]
#define HSM_EVT_UMOUNT   4
 ivdfs successfully umounted
#define HSM_EVT_OPEN   5
 file opened
#define HSM_EVT_RELEASE   6
 file released (last close)
#define HSM_EVT_CHG_NAME   7
 Change of name (create/rename/move/remove).
#define HSM_EVT_CHG_DATA   8
 Change of file data.
#define HSM_EVT_CHG_ATTR   9
 Change of file attributes.
#define HSM_EVT_CHG_META   10
 Change of file meta data (EA, ACL...).
#define HSM_EVT_DATA_OFFL   11
 Data of file is offline - recall required [sync].
#define HSM_EVT_CANCEL_REQ   12
 Cancel timeouted sync request.
#define HSM_EVT_LOG_ERROR   13
 Write error to log file.
#define HSM_OPMODE_REGULAR   0
 HSM_IOC_SET_OPMODE argument for ioctl() call.
#define HSM_OPMODE_WORM   1
#define HSM_OPMODE_READ_ONLY_NO_RECALL   2
#define HSM_OP_MIGRATION   1
 HSM_IOC_LOCK_FILE argument for ioctl() call HSM_IOC_UNLOCK_FILE argument for ioctl() call.
#define HSM_OP_RELEASE   2
#define HSM_IOC_MOD_COUNT   _IOW('I', 0x00, int)
 IVDFS ioctl() commands.
#define HSM_IOC_SET_DEBUG   _IOW('I', 0x01, unsigned short)
 Set debuging of FS Filter.
#define HSM_IOC_SET_TIMEOUT   _IOW('I', 0x02, unsigned short)
 Set timeout for syncronous events (in seconds).
#define HSM_IOC_DUMP_STATE   _IOW('I', 0x03, int)
 Dump current internal state of ivdfs.
#define HSM_IOC_SET_OPMODE   _IOW('I', 0x04, ivd_ioc_opmode_t *)
 Set operation mode regular/WORM/read-only-no-recall.
#define HSM_IOC_SET_INVIO_PID   _IOW('I', 0x05, int)
 Set PID for InvIO.
#define HSM_IOC_GET_FILEID   _IOW('I', 0x10, ivd_ioc_setfileid_t *)
 Get FileID and chunk size for existing file/dir/symlink.
#define HSM_IOC_SET_FILEID   _IOW('I', 0x11, ivd_ioc_setfileid_t *)
 Set FileID and chunk size for newly created file/dir/symlink.
#define HSM_IOC_LOCK_FILE   _IOW('I', 0x12, ivd_ioc_lockfile_t *)
 Lock file for migration/release.
#define HSM_IOC_UNLOCK_FILE   _IOW('I', 0x13, ivd_ioc_lockfile_t *)
 Unlock file for migration/release.
#define HSM_IOC_GET_FILE_INFO   _IOW('I', 0x14, ivd_ioc_fileinfo_t *)
 Get file information - EA.
#define HSM_IOC_DATA_CLEAN   _IOW('I', 0x20, ivd_ioc_datastate_t *)
 File data is clean (after migration).
#define HSM_IOC_DATA_OFFLINE   _IOW('I', 0x21, ivd_ioc_datastate_t *)
 File data is offline (after release).
#define HSM_IOC_DATA_ONLINE   _IOW('I', 0x22, ivd_ioc_datastate_t *)
 File data is online (after recall).
#define HSM_IOC_TRIGGER_EVENT   _IOW('I', 0x30, ivd_ioc_triggevent_t *)
 Force recall/migrate.
#define HSM_OK_REPLY_d   0
 OK status for replying.
#define HSM_ERR_REPLY_d   1
 ERROR status for replying.
#define HSM_ERR_HSM_CLOSED_d   2
 ERROR HSM released comm, but partition mounted.
#define HSM_ERR_BOTTOM_MOUNT_d   3
 ERROR could not mount bottom file system.
#define HSM_WRN_HSM_BUSY_d   4
 WARNING HSM stoped or slowed read comm, but partition mounted.

Typedefs

typedef uint8_t UInt8_t
 define IVD specific types
typedef uint16_t UInt16_t
typedef uint32_t UInt32_t
typedef uint64_t UInt64_t
typedef int8_t Int8_t
typedef int16_t Int16_t
typedef int32_t Int32_t
typedef int64_t Int64_t

Functions

static int ivdfs_bad_cookie (ivd_inode_info_t *ii)
int ivdfs_readpage (struct file *filp, struct page *page)
int ivdfs_readpages (struct file *filp, struct address_space *mapping, struct list_head *pages, unsigned nr_pages)
int ivdfs_writepage (struct page *page, struct writeback_control *wbc)
int ivdfs_writepages (struct address_space *mapping, struct writeback_control *wbc)
int ivdfs_write_begin (struct file *filp, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata)
int ivdfs_write_end (struct file *filp, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata)
void ivdfs_sync_page (struct page *page)
int ivdfs_releasepage (struct page *page, gfp_t gfp)
sector_t ivdfs_bmap (struct address_space *mapping, sector_t sect)
int ivdfs_set_page_dirty (struct page *page)
void ivdfs_invalidatepage (struct page *page, unsigned long offset)
ssize_t ivdfs_direct_IO (int rw, struct kiocb *kiocb, const struct iovec *iov, loff_t offset, unsigned long nr_segs)
static int ivdfs_comm_wait_reply (ivd_comm_t *ic, ivd_req_entry_t *re)
int ivdfs_comm_add_req (ivd_comm_t *ic, ivd_req_t *req, int reqsize, unsigned int flags)
static ssize_t ivdfs_dev_read (struct file *file, char __user *buf, size_t nbytes, loff_t *off)
static ssize_t ivdfs_dev_write (struct file *file, const char __user *buf, size_t nbytes, loff_t *off)
static unsigned int ivdfs_dev_poll (struct file *file, struct poll_table_struct *wait)
static int ivdfs_dev_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
static int ivdfs_dev_open (struct inode *inode, struct file *file)
static int ivdfs_dev_release (struct inode *inode, struct file *file)
void ivd_initialize_comm (ivd_comm_t *ic)
void ivd_cleanup_comm (ivd_comm_t *ic)
ivd_comm_tivd_get_comm (dev_t dev)
void ivd_put_comm (ivd_comm_t *ic)
ivd_comm_tivd_find_comm (dev_t dev)
int ivdfs_setopmode (ivd_comm_t *ic, UInt16_t opmode, UInt16_t timeout, bool recallOnOpen)
void ivd_comm_dump_state (void)
int ivdfs_comm_init (void)
void ivdfs_comm_exit (void)
static int ivdfs_get_path (struct dentry *de, char *buf, int buflen)
int ivdfs_evt_pre_mount (ivd_comm_t *ic, dev_t dev, unsigned short comm_minor, const char *dev_name)
int ivdfs_evt_cancel_req (ivd_comm_t *ic, int reqid)
int ivdfs_evt_mount (ivd_comm_t *ic, dev_t fs_device, const char *dev_name, int code)
int ivdfs_evt_umount (ivd_comm_t *ic, struct super_block *sb)
int ivdfs_evt_open (struct file *file)
int ivdfs_evt_release (struct file *file)
int ivdfs_evt_chg_name (struct dentry *de, struct dentry *de_old)
int ivdfs_evt_chg_data (struct inode *inode, loff_t off, size_t size)
int ivdfs_evt_chg_attr (struct dentry *de)
int ivdfs_evt_data_offl (struct dentry *de, loff_t off, size_t size, int cause)
int ivdfs_evt_log_error (int code, ivd_comm_t *ic)
void ivdfs_evt_simulate_create (struct dentry *de)
int ivdfs_file_open (struct inode *inode, struct file *file)
int ivdfs_file_release (struct inode *inode, struct file *file)
int ivdfs_file_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
ssize_t ivdfs_file_write (struct file *file, const char __user *buf, size_t size, loff_t *offset)
ssize_t ivdfs_file_read (struct file *file, char __user *buf, size_t size, loff_t *offset)
ssize_t ivdfs_file_aio_read (struct kiocb *kiocb, const struct iovec *iovec, unsigned long size, loff_t offset)
ssize_t ivdfs_file_aio_write (struct kiocb *kiocb, const struct iovec *iovec, unsigned long size, loff_t offset)
int ivdfs_file_mmap (struct file *file, struct vm_area_struct *vma)
int ivdfs_file_fsync (struct file *file, struct dentry *de, int datasync)
int ivdfs_file_fasync (int fd, struct file *file, int on)
int ivdfs_file_aio_fsync (struct kiocb *kiocb, int datasync)
int ivdfs_file_flush (struct file *file, fl_owner_t id)
int ivdfs_file_lock (struct file *file, int cmd, struct file_lock *file_lock)
int ivdfs_file_flock (struct file *file, int cmd, struct file_lock *file_lock)
ssize_t ivdfs_file_sendpage (struct file *file, struct page *page, int offset, size_t size, loff_t *pos, int more)
unsigned long ivdfs_file_get_unmapped_area (struct file *file, unsigned long addr, unsigned long len, unsigned long offset, unsigned long flags)
ivd_fs_tivd_get_fs (char *fstype)
void ivd_put_fs (ivd_fs_t *fs)
void ivdfs_set_super_ops (ivd_fs_t *fs, struct super_block *sb)
static void ivdfs_set_d_inode_ops (ivd_fs_t *fs, struct inode *inode)
static void ivdfs_set_f_inode_ops (ivd_fs_t *fs, struct inode *inode)
static void ivdfs_set_d_file_ops (ivd_fs_t *fs, struct inode *inode)
static void ivdfs_set_f_file_ops (ivd_fs_t *fs, struct inode *inode)
static void ivdfs_set_f_addrs_ops (ivd_fs_t *fs, struct inode *inode)
int ivdfs_set_inode_ops (ivd_comm_t *ic, struct inode *inode)
void ivdfs_init_inode_info (struct inode *inode, int flags)
void ivdfs_read_inode_info (struct inode *inode, int flags)
void ivdfs_write_inode_info (struct inode *inode, int flags)
int ivdfs_mark_offline (struct inode *inode, loff_t off, loff_t pos, int flags)
void ivdfs_mark_online (struct inode *inode, loff_t off, loff_t pos, int flags)
int ivdfs_mark_dirty (struct inode *inode, loff_t off, loff_t pos, int flags)
void ivdfs_mark_clean (struct inode *inode, loff_t off, loff_t pos, int flags)
int ivdfs_get_fileid (ivd_comm_t *ic, UInt64_t id_fs, UInt64_t *file_id, UInt64_t *chunk_size)
int ivdfs_set_fileid (ivd_comm_t *ic, UInt64_t id_fs, UInt64_t file_id, UInt64_t chunk_size)
int ivdfs_get_fileinfo (ivd_comm_t *ic, unsigned long ino, ivd_ioc_fileinfo_t *fi)
int ivdfs_lock_file (ivd_comm_t *ic, unsigned int cmd, UInt64_t id_fs, UInt64_t file_id, UInt32_t op, UInt32_t *chg_time, UInt64_t *chunk_size, UInt32_t *flags)
int ivdfs_data_state (ivd_comm_t *ic, unsigned int cmd, UInt64_t id_fs, UInt64_t file_id, UInt64_t chunk_size, UInt64_t chunk_offset, UInt32_t mod_time)
int ivdfs_is_worm_protected (struct inode *inode)
void ivdfs_set_close_time (struct inode *inode, struct timespec time)
int ivdfs_trigger_event (ivd_comm_t *ic, unsigned int evt, UInt64_t id_fs, UInt64_t chunk_size, UInt64_t chunk_offset)
int ivdfs_attach (ivd_comm_t *ic, struct inode *inode)
struct dentry * ivdfs_lookup (struct inode *dir, struct dentry *dentry, struct nameidata *nd)
int ivdfs_create (struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
int ivdfs_link (struct dentry *old_de, struct inode *dir, struct dentry *de)
int ivdfs_unlink (struct inode *dir, struct dentry *de)
int ivdfs_symlink (struct inode *dir, struct dentry *de, const char *symname)
int ivdfs_mkdir (struct inode *dir, struct dentry *de, int mode)
int ivdfs_rmdir (struct inode *dir, struct dentry *de)
int ivdfs_mknod (struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
int ivdfs_rename (struct inode *old_dir, struct dentry *old_de, struct inode *new_dir, struct dentry *new_de)
int ivdfs_setattr (struct dentry *de, struct iattr *attr)
void ivdfs_truncate (struct inode *inode)
struct inode * hsmfs_iget (struct super_block *sb, unsigned long ino)
int ivdfs_readlink (struct dentry *de, char __user *buf, int buflen)
void ivdfs_follow_link (struct dentry *de, struct nameidata *nd)
void ivdfs_put_link (struct dentry *dentry, struct nameidata *nd, void *p)
int ivdfs_permission (struct inode *inode, int mask)
 MODULE_LICENSE ("GPL")
 MODULE_AUTHOR (ivd_COMPANY_NAME_d)
 MODULE_DESCRIPTION (ivd_MODULE_DESC_d" - Version: "TO_STR(ivd_VERSION_MAJOR_d)"."TO_STR(ivd_VERSION_MINOR_d)"."TO_STR(ivd_VERSION_SYS_MAINT_REL_d)"-"TO_STR(ivd_VERSION_BUILDNUM_d)" "ivd_VERSION_LABEL_d)
 MODULE_VERSION (TO_STR(ivd_VERSION_MAJOR_d)"."TO_STR(ivd_VERSION_MINOR_d)"."TO_STR(ivd_VERSION_SYS_MAINT_REL_d)"-"TO_STR(ivd_VERSION_BUILDNUM_d)" ")
static int ivdfs_parse_options (char *options, char *fs)
int ivdfs_get_sb (struct file_system_type *fst, int flags, const char *dev_name, void *data, struct vfsmount *mnt)
 The mount function of the file system.
void ivdfs_kill_sb (struct super_block *sb)
static int __init ivdfs_init (void)
static void __exit ivdfs_exit (void)
 module_init (ivdfs_init)
 module_exit (ivdfs_exit)
 module_param (hsmfs_debug, ulong, S_IRUGO|S_IWUSR)
 MODULE_PARM_DESC (hsmfs_debug,"Debugging flags")
 module_param (hsmfs_dev_major, ushort, S_IRUGO)
 MODULE_PARM_DESC (hsmfs_dev_major,"hsmfs comm device major number (0 = autoselect)")
 module_param (hsmfs_timeout, ushort, S_IRUGO)
 MODULE_PARM_DESC (hsmfs_timeout,"hsmfs comm timeout for synchronous requests (seconds)")
 module_param (hsmfs_max_outstanding, int, S_IRUGO|S_IWUSR)
 MODULE_PARM_DESC (hsmfs_max_outstanding,"max # of outstanding requests per FS (length of the queue)")
 module_param (hsmfs_sleep_factor, int, S_IRUGO|S_IWUSR)
 MODULE_PARM_DESC (hsmfs_sleep_factor,"sleeping factor in wait_jiffies = messages * messages / sleep_factor")
 module_param (hsmfs_max_sleep_time, int, S_IRUGO|S_IWUSR)
 MODULE_PARM_DESC (hsmfs_max_sleep_time,"max sleep time in seconds")
 module_param (hsmfs_max_hsm_busy, int, S_IRUGO)
 MODULE_PARM_DESC (hsmfs_max_hsm_busy,"seconds of HSM inactivity before hsmfs starts writing warnings")
 module_param (hsmfs_import_delay, int, S_IRUGO)
 MODULE_PARM_DESC (hsmfs_import_delay,"delay in hundredth of seconds on first lookup of a file that was created in ext3 when hsmfs was not active")
 module_param (hsmfs_new_on_open, int, S_IRUGO)
 MODULE_PARM_DESC (hsmfs_new_on_open,"new-on-open mode")
 module_param (hsmfs_event_alert, uint, S_IRUGO)
 MODULE_PARM_DESC (hsmfs_event_alert,"report event queue counters when # of events in queue passes multiple of this threshold")
 module_param (hsmfs_path_bufsize, uint, S_IRUGO)
 MODULE_PARM_DESC (hsmfs_path_bufsize,"hsmfs buffer size for pathnames")
 module_param (hsmfs_chg_data_interval, uint, S_IRUGO)
 MODULE_PARM_DESC (hsmfs_chg_data_interval,"hsmfs change data event interval")
static void ivdfs_inode_init (void *foo)
 This is contructor function, which is called for each allocated element in the hsm_ii_cache_p by the slab allocator.
int ivdfs_slab_init ()
void ivdfs_slab_destroy ()
int alloc_hsmfs_inode_info (struct inode *inode)
int free_hsmfs_inode_info (struct inode *inode)
void ivdfs_clear_inode (struct inode *inode)
 This function is called when VFS wants to clear inode.
void ivdfs_put_super (struct super_block *sb)
void ivdfs_dirty_inode (struct inode *inode)
int ivdfs_write_inode (struct inode *inode, struct writeback_control *wbc)
void ivdfs_delete_inode (struct inode *inode)
void ivdfs_drop_inode (struct inode *inode)
 This function is called when the last access to the inode is dropped, with the inode_lock spinlock held.
void ivdfs_write_super (struct super_block *sb)
int ivdfs_freeze_fs (struct super_block *sb)
int ivdfs_unfreeze_fs (struct super_block *sb)
int ivdfs_statfs (struct dentry *de, struct kstatfs *buf)
int ivdfs_remount_fs (struct super_block *sb, int *flags, char *data)
void ivdfs_umount_begin (struct super_block *sb)
void ivdfs_sync_fs (struct super_block *sb, int wait)

Variables

static spinlock_t comm_lock = SPIN_LOCK_UNLOCKED
static ivd_comm_t ivd_comm [MAX_IVDFS]
struct file_operations ivdfs_dev_fops
static spinlock_t supp_fs_lock = SPIN_LOCK_UNLOCKED
static ivd_fs_t ivd_supp_fs []
struct {
   UInt32_t   major
   UInt32_t   minor
   UInt32_t   smr
   UInt32_t   build
   const char *   label
   const char *   moduleVersion
   const char *   buildTime
   const char *   buildSystem
ivdfs_vers
static struct file_system_type hsmfs_fstype
const char *const hsmfs_cookie = "hsmAMLK\0"
 hsmfs magic cookie for inode info.
struct timespec ivd_nul_time = {0, 0}
unsigned long hsmfs_debug = 0
 Module parameters - can be set at insmod time.
unsigned short hsmfs_dev_major = 0
unsigned short hsmfs_timeout = 5*60
int hsmfs_max_outstanding = 50
int hsmfs_sleep_factor = ivdfs_SLEEP_FACTOR_d
int hsmfs_max_sleep_time = ivdfs_MAX_SLEEP_TIME_d
int hsmfs_max_hsm_busy = ivdfs_MAX_HSM_BUSY_d
int hsmfs_import_delay = ivdfs_IMPORT_DELAY_d
int hsmfs_new_on_open = ivdfs_NEW_ON_OPEN_FILES_d
unsigned int hsmfs_event_alert = ivdfs_EVENT_ALERT_d
unsigned int hsmfs_path_bufsize = ivdfs_PATH_BUFSIZE_d
unsigned int hsmfs_chg_data_interval = ivdfs_CHG_DATA_INTERVAL_d
const char *const hsmfs_cookie
 hsmfs magic cookie for inode info.
struct timespec ivd_nul_time
unsigned long hsmfs_debug
 Module parameters - can be set at insmod time.
unsigned short hsmfs_timeout
int hsmfs_max_outstanding
int hsmfs_sleep_factor
int hsmfs_max_sleep_time
int hsmfs_max_hsm_busy
int hsmfs_import_delay
int hsmfs_new_on_open
unsigned short hsmfs_dev_major
unsigned int hsmfs_chg_data_interval
unsigned int hsmfs_event_alert
unsigned int hsmfs_path_bufsize
static struct kmem_cache * hsm_ii_cache_p

Detailed Description


Define Documentation

#define __TO_STR (   x  )     #x

stringification macro

Definition at line 289 of file ivdfs.h.

#define ALIGN_FILE (   x  )     ROUND_UP(x,8)

Definition at line 90 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by GetPathList(), and ivdfs_get_path().

#define ALIGN_FILE (   x  )     ROUND_UP(x,8)

Definition at line 54 of file include/ivd/ivdfs_linux.h.

#define CHECK_FILE_ACCESS (   _ic,
  _inode,
  _file,
  _func 
)

Definition at line 267 of file ivdfs.h.

#define CHECK_FILE_ATTR_DATA (   _ic,
  _inode,
  _file 
)

Definition at line 268 of file ivdfs.h.

#define CHECK_INODE_ACCESS (   _ic,
  _inode,
  _func 
)

Definition at line 265 of file ivdfs.h.

#define CHECK_INODE_ACCESS_MOVE (   _ic,
  _inode,
  _old_de,
  _new_de,
  _func 
)

Definition at line 266 of file ivdfs.h.

#define DBG_COMM   (1 << 3)

pseudo device communication

Definition at line 300 of file ivdfs.h.

Referenced by ivdfs_comm_wait_reply(), ivdfs_dev_read(), and ivdfs_dev_write().

#define DBG_COMM_DETAIL   (1 << 19)

pseudo device communication - detail tracing

Definition at line 311 of file ivdfs.h.

Referenced by ivdfs_comm_wait_reply(), ivdfs_dev_ioctl(), ivdfs_dev_open(), ivdfs_dev_poll(), ivdfs_dev_read(), ivdfs_dev_release(), and ivdfs_dev_write().

#define DBG_EVT   (1 << 4)

logging of events

Definition at line 302 of file ivdfs.h.

Referenced by ivdfs_get_path().

#define DBG_EVT_DETAIL   (1 << 20)

logging of events - detail event structure dump

Definition at line 313 of file ivdfs.h.

Referenced by ivdfs_get_path().

#define DBG_FILTER   (1 << 1)

file system filter

Definition at line 296 of file ivdfs.h.

#define DBG_II   (1 << 5)

Inode info/HSM attributes.

Definition at line 304 of file ivdfs.h.

#define DBG_II_DETAIL   (1 << 21)

Inode info/HSM attributes - detail tracing.

Definition at line 315 of file ivdfs.h.

Referenced by free_hsmfs_inode_info().

#define DBG_INV_IO   (1 << 30)

tracing of Invisible IO (all operations that are hidden)

Definition at line 320 of file ivdfs.h.

#define DBG_LOCK   (1 << 6)

locking

Definition at line 306 of file ivdfs.h.

#define DBG_LOCK_DETAIL   (1 << 22)

locking - detail tracing

Definition at line 317 of file ivdfs.h.

#define DBG_MAIN   (1 << 0)

main filter execution flow

Definition at line 294 of file ivdfs.h.

Referenced by ivdfs_dev_ioctl(), and ivdfs_get_sb().

#define DBG_VFS   (1 << 2)

tracing of VFS methods (all except page cache)

Definition at line 298 of file ivdfs.h.

Referenced by iopen_lookup(), ivdfs_iopen_check(), ivdfs_iopen_get_inode(), and ivdfs_kill_sb().

#define DBG_VFS_ALL   (1 << 31)

tracing of all VFS methods (even those that are not needed)

Definition at line 322 of file ivdfs.h.

Referenced by ivdfs_set_d_inode_ops(), ivdfs_set_f_addrs_ops(), ivdfs_set_f_file_ops(), and ivdfs_set_f_inode_ops().

#define DBG_VFS_PAGE   (1 << 18)

tracing of VFS methods (page cache)

Definition at line 309 of file ivdfs.h.

#define EIVDBUSY   EBUSY

Definition at line 350 of file ivdfs.h.

#define FSTYPE_SLEN   20

maximum length of FS type string, i.e. ext3, reiserfs, intermezzo..

Definition at line 278 of file ivdfs.h.

Referenced by ivdfs_get_sb(), and ivdfs_parse_options().

#define HSM_CAUSE_MIGRATE   2

Definition at line 123 of file include/ivd/ivdfs_linux.h.

#define HSM_CAUSE_MIGRATE   2
#define HSM_CAUSE_OFFLINE   0

Definition at line 121 of file include/ivd/ivdfs_linux.h.

#define HSM_CAUSE_OFFLINE   0

Definition at line 157 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivd_FS_File::ReplySyncEvents().

#define HSM_CAUSE_RECALL   1

Definition at line 122 of file include/ivd/ivdfs_linux.h.

#define HSM_CAUSE_RECALL   1

Definition at line 158 of file client/fsfilter/linux/ivdfs_linux.h.

#define HSM_DEVNAME   "hsmfs"
#define HSM_DEVNAME   "hsmfs"

Definition at line 19 of file include/ivd/ivdfs_linux.h.

#define HSM_ERR_BOTTOM_MOUNT_d   3

ERROR could not mount bottom file system.

Definition at line 336 of file include/ivd/ivdfs_linux.h.

#define HSM_ERR_BOTTOM_MOUNT_d   3

ERROR could not mount bottom file system.

Definition at line 372 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by FSEvMgrThrd::Run().

#define HSM_ERR_HSM_CLOSED_d   2

ERROR HSM released comm, but partition mounted.

Definition at line 333 of file include/ivd/ivdfs_linux.h.

#define HSM_ERR_HSM_CLOSED_d   2

ERROR HSM released comm, but partition mounted.

Definition at line 369 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_release(), and FSEvMgrThrd::Run().

#define HSM_ERR_REPLY_d   1

ERROR status for replying.

Definition at line 330 of file include/ivd/ivdfs_linux.h.

#define HSM_ERR_REPLY_d   1
#define HSM_EVT_CANCEL_REQ   12

Cancel timeouted sync request.

Definition at line 193 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_CANCEL_REQ   12

Cancel timeouted sync request.

Definition at line 229 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by FSEvMgrThrd::Run().

#define HSM_EVT_CHG_ATTR   9

Change of file attributes.

Definition at line 187 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_CHG_ATTR   9

Change of file attributes.

Definition at line 223 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_read(), and ivd_FileSystemAPI::Run().

#define HSM_EVT_CHG_DATA   8

Change of file data.

Definition at line 185 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_CHG_DATA   8

Change of file data.

Definition at line 221 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_read(), and ivd_FileSystemAPI::Run().

#define HSM_EVT_CHG_META   10

Change of file meta data (EA, ACL...).

Definition at line 189 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_CHG_META   10

Change of file meta data (EA, ACL...).

Definition at line 225 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_read().

#define HSM_EVT_CHG_NAME   7

Change of name (create/rename/move/remove).

Definition at line 183 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_CHG_NAME   7

Change of name (create/rename/move/remove).

Definition at line 219 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_read(), and ivd_FileSystemAPI::Run().

#define HSM_EVT_DATA_OFFL   11

Data of file is offline - recall required [sync].

Definition at line 191 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_DATA_OFFL   11

Data of file is offline - recall required [sync].

Definition at line 227 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_read(), and ivd_FileSystemAPI::Run().

#define HSM_EVT_LOG_ERROR   13

Write error to log file.

Definition at line 195 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_LOG_ERROR   13

Write error to log file.

Definition at line 231 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by FSEvMgrThrd::Run().

#define HSM_EVT_MOUNT   2

ivdfs successfully mounted

Definition at line 171 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_MOUNT   2

ivdfs successfully mounted

Definition at line 207 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivd_FileSystemAPI::Run().

#define HSM_EVT_OPEN   5

file opened

Definition at line 178 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_OPEN   5

file opened

Definition at line 214 of file client/fsfilter/linux/ivdfs_linux.h.

#define HSM_EVT_PRE_MOUNT   1

mount of ivdfs requested [sync]

Definition at line 169 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_PRE_MOUNT   1

mount of ivdfs requested [sync]

Definition at line 205 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by FSEvMgrThrd::Run().

#define HSM_EVT_PRE_UMOUNT   3

umount of ivdfs requested [sync]

Definition at line 173 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_PRE_UMOUNT   3

umount of ivdfs requested [sync]

Definition at line 209 of file client/fsfilter/linux/ivdfs_linux.h.

#define HSM_EVT_RELEASE   6

file released (last close)

Definition at line 180 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_RELEASE   6

file released (last close)

Definition at line 216 of file client/fsfilter/linux/ivdfs_linux.h.

#define HSM_EVT_UMOUNT   4

ivdfs successfully umounted

Definition at line 175 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_UMOUNT   4

ivdfs successfully umounted

Definition at line 211 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivd_FileSystemAPI::Run().

#define HSM_EVT_UNKNOWN   0

IVD request/event types.

unknown - no event

Definition at line 166 of file include/ivd/ivdfs_linux.h.

#define HSM_EVT_UNKNOWN   0

IVD request/event types.

unknown - no event

Definition at line 202 of file client/fsfilter/linux/ivdfs_linux.h.

#define HSM_IOC_DATA_CLEAN   _IOW('I', 0x20, ivd_ioc_datastate_t *)

File data is clean (after migration).

Definition at line 314 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_DATA_CLEAN   _IOW('I', 0x20, ivd_ioc_datastate_t *)

File data is clean (after migration).

Definition at line 350 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_ioctl(), and ivd_FS_File::SetDataClean().

#define HSM_IOC_DATA_OFFLINE   _IOW('I', 0x21, ivd_ioc_datastate_t *)

File data is offline (after release).

Definition at line 317 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_DATA_OFFLINE   _IOW('I', 0x21, ivd_ioc_datastate_t *)

File data is offline (after release).

Definition at line 353 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_ioctl(), and ivd_FS_File::SetDataOffline().

#define HSM_IOC_DATA_ONLINE   _IOW('I', 0x22, ivd_ioc_datastate_t *)

File data is online (after recall).

Definition at line 356 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_ioctl(), and ivd_FS_File::SetDataOnline().

#define HSM_IOC_DATA_ONLINE   _IOW('I', 0x22, ivd_ioc_datastate_t *)

File data is online (after recall).

Definition at line 320 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_DUMP_STATE   _IOW('I', 0x03, int)

Dump current internal state of ivdfs.

Definition at line 290 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_DUMP_STATE   _IOW('I', 0x03, int)

Dump current internal state of ivdfs.

Definition at line 326 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by DumpIvdFsState(), and ivdfs_dev_ioctl().

#define HSM_IOC_GET_FILE_INFO   _IOW('I', 0x14, ivd_ioc_fileinfo_t *)

Get file information - EA.

Definition at line 347 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivd_FS_File::GetProperties(), and ivdfs_dev_ioctl().

#define HSM_IOC_GET_FILE_INFO   _IOW('I', 0x14, ivd_ioc_fileinfo_t *)

Get file information - EA.

Definition at line 311 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_GET_FILEID   _IOW('I', 0x10, ivd_ioc_setfileid_t *)

Get FileID and chunk size for existing file/dir/symlink.

Definition at line 299 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_GET_FILEID   _IOW('I', 0x10, ivd_ioc_setfileid_t *)

Get FileID and chunk size for existing file/dir/symlink.

Definition at line 335 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_ioctl().

#define HSM_IOC_LOCK_FILE   _IOW('I', 0x12, ivd_ioc_lockfile_t *)

Lock file for migration/release.

Definition at line 305 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_LOCK_FILE   _IOW('I', 0x12, ivd_ioc_lockfile_t *)

Lock file for migration/release.

Definition at line 341 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_ioctl().

#define HSM_IOC_MOD_COUNT   _IOW('I', 0x00, int)

IVDFS ioctl() commands.

Increment/decrement ivdfs module usage count

Definition at line 281 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_MOD_COUNT   _IOW('I', 0x00, int)

IVDFS ioctl() commands.

Increment/decrement ivdfs module usage count

Definition at line 317 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_ioctl().

#define HSM_IOC_SET_DEBUG   _IOW('I', 0x01, unsigned short)

Set debuging of FS Filter.

Definition at line 284 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_SET_DEBUG   _IOW('I', 0x01, unsigned short)
#define HSM_IOC_SET_FILEID   _IOW('I', 0x11, ivd_ioc_setfileid_t *)

Set FileID and chunk size for newly created file/dir/symlink.

Definition at line 338 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_ioctl(), and ivd_FS_File::SetFileID().

#define HSM_IOC_SET_FILEID   _IOW('I', 0x11, ivd_ioc_setfileid_t *)

Set FileID and chunk size for newly created file/dir/symlink.

Definition at line 302 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_SET_INVIO_PID   _IOW('I', 0x05, int)

Set PID for InvIO.

Definition at line 296 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_SET_INVIO_PID   _IOW('I', 0x05, int)

Set PID for InvIO.

Definition at line 332 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivd_FileSystemAPI::ivd_FileSystemAPI(), and ivdfs_dev_ioctl().

#define HSM_IOC_SET_OPMODE   _IOW('I', 0x04, ivd_ioc_opmode_t *)

Set operation mode regular/WORM/read-only-no-recall.

Definition at line 293 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_SET_OPMODE   _IOW('I', 0x04, ivd_ioc_opmode_t *)

Set operation mode regular/WORM/read-only-no-recall.

Definition at line 329 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_ioctl(), and ivd_FileSystemAPI::SetConfiguration().

#define HSM_IOC_SET_TIMEOUT   _IOW('I', 0x02, unsigned short)

Set timeout for syncronous events (in seconds).

Definition at line 323 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_ioctl(), and ivd_FileSystemAPI::SetConfiguration().

#define HSM_IOC_SET_TIMEOUT   _IOW('I', 0x02, unsigned short)

Set timeout for syncronous events (in seconds).

Definition at line 287 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_TRIGGER_EVENT   _IOW('I', 0x30, ivd_ioc_triggevent_t *)

Force recall/migrate.

Definition at line 323 of file include/ivd/ivdfs_linux.h.

#define HSM_IOC_TRIGGER_EVENT   _IOW('I', 0x30, ivd_ioc_triggevent_t *)

Force recall/migrate.

Definition at line 359 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_ioctl(), and ivd_FS_File::TriggerEvent().

#define HSM_IOC_UNLOCK_FILE   _IOW('I', 0x13, ivd_ioc_lockfile_t *)

Unlock file for migration/release.

Definition at line 344 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_dev_ioctl().

#define HSM_IOC_UNLOCK_FILE   _IOW('I', 0x13, ivd_ioc_lockfile_t *)

Unlock file for migration/release.

Definition at line 308 of file include/ivd/ivdfs_linux.h.

#define HSM_OK_REPLY_d   0

OK status for replying.

Definition at line 327 of file include/ivd/ivdfs_linux.h.

#define HSM_OK_REPLY_d   0

OK status for replying.

Definition at line 363 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivd_FS_File::ReplySyncEvents().

#define HSM_OP_MIGRATION   1

HSM_IOC_LOCK_FILE argument for ioctl() call HSM_IOC_UNLOCK_FILE argument for ioctl() call.

Definition at line 228 of file include/ivd/ivdfs_linux.h.

#define HSM_OP_MIGRATION   1

HSM_IOC_LOCK_FILE argument for ioctl() call HSM_IOC_UNLOCK_FILE argument for ioctl() call.

Definition at line 264 of file client/fsfilter/linux/ivdfs_linux.h.

#define HSM_OP_RELEASE   2

Definition at line 229 of file include/ivd/ivdfs_linux.h.

#define HSM_OP_RELEASE   2

Definition at line 265 of file client/fsfilter/linux/ivdfs_linux.h.

#define HSM_OPMODE_READ_ONLY_NO_RECALL   2

Definition at line 242 of file client/fsfilter/linux/ivdfs_linux.h.

#define HSM_OPMODE_READ_ONLY_NO_RECALL   2

Definition at line 206 of file include/ivd/ivdfs_linux.h.

#define HSM_OPMODE_REGULAR   0

HSM_IOC_SET_OPMODE argument for ioctl() call.

Definition at line 240 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_get_sb().

#define HSM_OPMODE_REGULAR   0

HSM_IOC_SET_OPMODE argument for ioctl() call.

Definition at line 204 of file include/ivd/ivdfs_linux.h.

#define HSM_OPMODE_WORM   1

Definition at line 205 of file include/ivd/ivdfs_linux.h.

#define HSM_OPMODE_WORM   1

Definition at line 241 of file client/fsfilter/linux/ivdfs_linux.h.

#define HSM_VIRTUAL_INODE_DIR   6

special INODE for recalling files without DENTRY

Definition at line 85 of file ivdfs.h.

Referenced by ivdfs_iopen_check(), and ivdfs_iopen_get_inode().

#define HSM_WRN_HSM_BUSY_d   4

WARNING HSM stoped or slowed read comm, but partition mounted.

Definition at line 339 of file include/ivd/ivdfs_linux.h.

#define HSM_WRN_HSM_BUSY_d   4

WARNING HSM stoped or slowed read comm, but partition mounted.

Definition at line 375 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by FSEvMgrThrd::Run().

#define IOPEN_DIR   ".hsmfsInode"

Definition at line 60 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by GetInodePathList(), and ivdfs_iopen_check().

#define IOPEN_DIR   ".hsmfsInode"

Definition at line 24 of file include/ivd/ivdfs_linux.h.

#define IOPEN_DIR_LEN   11

Definition at line 25 of file include/ivd/ivdfs_linux.h.

#define IOPEN_DIR_LEN   11

Definition at line 61 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_iopen_check().

#define ivd_alert (   _fmt,
  _arg... 
)    printk(KERN_ALERT "%s: " _fmt "\n", "hsmfs", ## _arg)
#define IVD_BFS_NEEDS_USER_XATTR   0x0001

Definition at line 161 of file ivdfs.h.

Referenced by ivdfs_get_sb().

#define IVD_CAP_EFFECTIVE   *(kernel_cap_t *)&current->cred->cap_effective

Common module compilation defines.

Definition at line 76 of file ivdfs.h.

#define ivd_dbg (   _lvl,
  _fmt,
  _arg... 
)
Value:
do {                                                                    \
    if ((hsmfs_debug & _lvl))                                           \
        printk(KERN_DEBUG "%lu [%d,%d] %-23s " _fmt "\n", jiffies, current->pid, task_pgrp_nr(current), __FUNCTION__, ## _arg);   \
} while (0)

Definition at line 329 of file ivdfs.h.

Referenced by free_hsmfs_inode_info(), iopen_lookup(), ivdfs_comm_wait_reply(), ivdfs_dev_ioctl(), ivdfs_dev_open(), ivdfs_dev_poll(), ivdfs_dev_read(), ivdfs_dev_release(), ivdfs_dev_write(), ivdfs_get_path(), ivdfs_get_sb(), ivdfs_iopen_check(), ivdfs_iopen_get_inode(), and ivdfs_kill_sb().

#define IVD_DONT_WRITE   0x0002

Definition at line 53 of file ivdfs_hsmattr.h.

#define IVD_EF_NONBLOCK   0x0010

Definition at line 229 of file ivdfs.h.

Referenced by ivdfs_dev_read().

#define IVD_EF_REPLY   0x0002

Definition at line 228 of file ivdfs.h.

Referenced by ivdfs_comm_wait_reply().

#define IVD_EF_SYNC   0x0001

Definition at line 227 of file ivdfs.h.

Referenced by ivdfs_dev_read().

#define ivd_err (   _fmt,
  _arg... 
)    printk(KERN_ERR "%-23s ERR: " _fmt "\n", __FUNCTION__, ## _arg)
#define IVD_EVT_HDR (   _req,
  _evt,
  _dev 
)
Value:
do {                                \
    _req->hdr.type  = _evt;         \
    _req->hdr.pid   = current->pid; \
    _req->hdr.code  = 0;            \
    _req->hdr.major = MAJOR(_dev);  \
    _req->hdr.minor = MINOR(_dev);  \
} while (0)

Definition at line 143 of file ivdfs_events.c.

#define IVD_FILE_GEN (   _id_fs  )     ((UInt32_t)(_id_fs >> 32))

Definition at line 34 of file include/ivd/ivdfs_linux.h.

#define IVD_FILE_GEN (   _id_fs  )     ((UInt32_t)(_id_fs >> 32))

Definition at line 70 of file client/fsfilter/linux/ivdfs_linux.h.

#define IVD_FILE_ID_FS (   _ino,
  _gen 
)    (((UInt64_t)(_gen) << 32) + (_ino))

ID of file in filesystem = inode number + generation number.

Definition at line 32 of file include/ivd/ivdfs_linux.h.

#define IVD_FILE_ID_FS (   _ino,
  _gen 
)    (((UInt64_t)(_gen) << 32) + (_ino))

ID of file in filesystem = inode number + generation number.

Definition at line 68 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by ivdfs_get_path().

#define IVD_FILE_INO (   _id_fs  )     ((UInt32_t)(_id_fs & 0xFFFFFFFF))
#define IVD_FILE_INO (   _id_fs  )     ((UInt32_t)(_id_fs & 0xFFFFFFFF))

Definition at line 33 of file include/ivd/ivdfs_linux.h.

#define IVD_FREE (   ptr  ) 
Value:
do {                                                                \
    if (!ptr) {                                                     \
       ivd_err("free of NULL pointer [%s:%d]", __FILE__, __LINE__); \
    }                                                               \
    else {                                                          \
       kfree(ptr);                                                  \
       ptr = NULL;                                                  \
    }                                                               \
} while (0)

Definition at line 363 of file ivdfs.h.

Referenced by ivdfs_comm_wait_reply(), ivdfs_dev_read(), and ivdfs_dev_write().

#define ivd_ii (   _inode  )     ((ivd_inode_info_t *)(_inode->i_private))

Definition at line 376 of file ivdfs.h.

Referenced by free_hsmfs_inode_info(), iopen_lookup(), ivdfs_get_path(), and ivdfs_iopen_check().

#define IVD_IIF_CREATED   (1 << 30)

Definition at line 244 of file ivdfs.h.

#define IVD_IIF_DIRTY   ia_F_DIRTY

IVD Inode Info - record stored in each struct inode (stored in unused part of inode->u structure).

Definition at line 236 of file ivdfs.h.

#define IVD_IIF_LOCK_MIGRATION   (1 << 15)

Definition at line 239 of file ivdfs.h.

#define IVD_IIF_LOCK_RECALL   (1 << 16)

Definition at line 240 of file ivdfs.h.

#define IVD_IIF_LOCK_RELEASE   (1 << 17)

Definition at line 241 of file ivdfs.h.

#define IVD_IIF_MASTER   (1 << 29)

Definition at line 243 of file ivdfs.h.

#define IVD_IIF_NEW_ENTRY   (1 << 31)

Definition at line 245 of file ivdfs.h.

Referenced by ivdfs_get_path().

#define IVD_IIF_OFFLINE   ia_F_OFFLINE

Definition at line 237 of file ivdfs.h.

#define ivd_info (   _fmt,
  _arg... 
)    printk(KERN_INFO "%s: " _fmt "\n", "hsmfs", ## _arg)
#define IVD_ISEM_HELD   0x0001

Flags for locking and sending events.

Definition at line 52 of file ivdfs_hsmattr.h.

#define IVD_KEEP_TIME   0x0004

Definition at line 54 of file ivdfs_hsmattr.h.

#define IVD_MALLOC (   ptr,
  cast,
  size 
)
Value:
do {                                                                \
    ptr = (cast) kmalloc(size, GFP_KERNEL);                         \
    if (!ptr) {                                                     \
       ivd_err("Cannot allocate memory (size=%ld) [%s:%d]",         \
       (long int)size, __FILE__, __LINE__);                         \
       return -ENOMEM;                                              \
    }                                                               \
} while (0)

malloc/free

Definition at line 353 of file ivdfs.h.

#define IVD_OVERRIDE_ALL   1

Common module compilation defines.

Definition at line 80 of file ivdfs.h.

#define IVD_PRINT_ID_FS (   _id_fs  )     IVD_FILE_INO(_id_fs) << " (" << IVD_FILE_GEN(_id_fs) << ")"

Definition at line 72 of file client/fsfilter/linux/ivdfs_linux.h.

Referenced by hsm_ActiveFH::ActiveToList(), fs_api::AddGenericEvent(), hsm_MigByAPI::AllFilesInJobs(), TreeWalk::CheckDir(), MigrateTreewalk::CheckDir(), CheckRootMembersForEA(), hsm_FileHeader::CompleteMigIsDone(), i_HSM_i::CompleteMigration(), hsm_IVDFSRecoverer::CreateFile(), hsm_FileHeader::DecMemberRef(), hsm_InoObj::DecrRef(), hsm_FileHeader::DecrRef(), i_HSM_i::DoMigrationJob(), cmn_TreeWalk::DoWalk(), df_StandardAttr_t::Dump(), hdb_Tables::DumpActiveEntries(), hsm_MigByAPI::DumpInputInode(), hsm_MigByAPI::DumpJobInode(), hsm_FileHeader::DumpListEl(), i_HSM_i::EfficientRecall(), hsm_FileHeader::Event(), fs_api::EventMove(), hsm_FileHeader::FileToSeqElem(), fs_api::FindAndPrepareFH(), i_HSM_i::ForceRelease(), fs_api::GetDirFH(), hsm_FHpVecMgr::GetFH(), GetIdentify(), GetPathList(), hsmGetDirFH(), hsm_FileHeader::IncMemberRef(), hsm_InoObj::IncrRef(), hsm_FileHeader::IncrRef(), hsm_FileHeader::InitActive(), hsm_FHpVecMgr::InsertDirWithTest(), ivd_GetMountPoint(), hsm_FileHeader::MakeStat(), hsm_FileHeader::MigCanToPreJob(), hsm_FHmigc::Migrate(), i_HSM_i::MigrateByAPI(), hsm_FileHeader::MigrationIsDone(), hsm_FileHeader::NewName(), hsm_FileHeader::NewOwner(), hsm_FileHeader::OpenFile(), operator<<(), hsm_ActiveFH::OrphanedToMigList(), i_HSM_i::PackFile(), hsm_FHADPRecall::RecallFileFromADP(), hsm_FHpVecMgr::Remove(), hsm_FHpVecMgr::RemoveLastButOne(), ivd_FS_File::SetCollocationId(), hsm_FHdirty::TaskTime(), hsm_DirWaitList::TaskTime(), hsm_FileHeader::ToMigCand(), hsm_FHrelc::Truncate(), hsm_FileHeader::TruncateFile(), and log_ivdfs::Write().

#define IVD_PRINT_ID_FS (   _id_fs  )     IVD_FILE_INO(_id_fs) << " (" << IVD_FILE_GEN(_id_fs) << ")"

Definition at line 36 of file include/ivd/ivdfs_linux.h.

#define ivd_warn (   _fmt,
  _arg... 
)    printk(KERN_WARNING "%-23s WARN: " _fmt "\n", __FUNCTION__, ## _arg)

Definition at line 341 of file ivdfs.h.

Referenced by ivdfs_comm_wait_reply(), ivdfs_dev_ioctl(), and ivdfs_dev_read().

#define ivdfs_CHG_DATA_INTERVAL_d   1

Definition at line 53 of file ivdfs_params.h.

#define ivdfs_EVENT_ALERT_d   50000

Definition at line 54 of file ivdfs_params.h.

#define ivdfs_hsmattr_init (   _ia  )     memset(_ia, 0, sizeof(ivd_hsmattr_t))

Initialize HSM attributes.

Definition at line 69 of file ivdfs_hsmattr.c.

#define ivdfs_IMPORT_DELAY_d   1

Definition at line 52 of file ivdfs_params.h.

#define ivdfs_is_dirty (   _inode,
  _off,
  _size 
)    (ivd_ii(_inode)->flags & IVD_IIF_DIRTY)

Check if area of file (off, size) is dirty (changed from last migration).

Definition at line 64 of file ivdfs_hsmattr.h.

#define ivdfs_is_offline (   _inode,
  _off,
  _size 
)    (ivd_ii(_inode)->flags & IVD_IIF_OFFLINE)

Check if area of file (off, size) is offline (released).

Definition at line 57 of file ivdfs_hsmattr.h.

#define ivdfs_MAX_HSM_BUSY_d   10

Definition at line 49 of file ivdfs_params.h.

#define ivdfs_MAX_SLEEP_TIME_d   2

Definition at line 51 of file ivdfs_params.h.

#define ivdfs_NEW_ON_OPEN_ALL_d   2

Definition at line 60 of file ivdfs_params.h.

Referenced by ivdfs_get_path(), and ivdfs_init().

#define ivdfs_NEW_ON_OPEN_FILES_d   1

Definition at line 59 of file ivdfs_params.h.

Referenced by ivdfs_init().

#define ivdfs_NEW_ON_OPEN_NONE_d   0

Definition at line 58 of file ivdfs_params.h.

Referenced by ivdfs_init().

#define ivdfs_PATH_BUFSIZE_d   (2*PAGE_SIZE)

Definition at line 55 of file ivdfs_params.h.

#define ivdfs_SLEEP_FACTOR_d   200

Definition at line 50 of file ivdfs_params.h.

#define max (   a,
  b 
)    (((a) > (b)) ? (a) : (b))
#define MAX_DEVNAME   1024

Definition at line 58 of file client/fsfilter/linux/ivdfs_linux.h.

#define MAX_DEVNAME   1024

Definition at line 22 of file include/ivd/ivdfs_linux.h.

#define MAX_EVT_BUFSIZE   65536
#define MAX_EVT_BUFSIZE   65536

Definition at line 21 of file include/ivd/ivdfs_linux.h.

#define MAX_FSTYPES   3

maximum number of different FS types supported in single kernel

Definition at line 271 of file ivdfs.h.

#define MAX_IVDFS   256

maximum number of mounted hsmfs's

Definition at line 275 of file ivdfs.h.

Referenced by ivdfs_dev_open().

#define min (   a,
  b 
)    (((a) < (b)) ? (a) : (b))

min/max helpers

Definition at line 282 of file ivdfs.h.

Referenced by cmn_Time::cmn_Time(), ivdfs_parse_options(), ParseMICMediumNote(), and bea_MicMemory::Read().

#define OVERRIDE (   _ivd_ops,
  _op,
  _func 
)
Value:
{                                                                       \
    if (_ivd_ops->_op)                                                  \
    {                                                                   \
        ivd_dbg(DBG_FILTER, "%p <= %s", _func, TO_STR(_op));            \
        _ivd_ops->_op = _func;                                          \
    }                                                                   \
}

Definition at line 172 of file ivdfs_filter.c.

Referenced by ivdfs_set_d_file_ops(), ivdfs_set_d_inode_ops(), ivdfs_set_f_addrs_ops(), ivdfs_set_f_file_ops(), and ivdfs_set_f_inode_ops().

#define ROUND_UP (   x,
  n 
)    (((x)+(n)-1) & ~((n)-1))

Definition at line 89 of file client/fsfilter/linux/ivdfs_linux.h.

#define ROUND_UP (   x,
  n 
)    (((x)+(n)-1) & ~((n)-1))

Definition at line 53 of file include/ivd/ivdfs_linux.h.

#define TO_STR (   x  )     __TO_STR(x)

Definition at line 290 of file ivdfs.h.


Typedef Documentation

typedef int16_t Int16_t

Definition at line 93 of file ivdfs.h.

typedef int32_t Int32_t

Definition at line 94 of file ivdfs.h.

typedef int64_t Int64_t

Definition at line 95 of file ivdfs.h.

typedef int8_t Int8_t

Definition at line 92 of file ivdfs.h.

typedef uint16_t UInt16_t

Definition at line 89 of file ivdfs.h.

typedef uint32_t UInt32_t

Definition at line 90 of file ivdfs.h.

typedef uint64_t UInt64_t

Definition at line 91 of file ivdfs.h.

typedef uint8_t UInt8_t

define IVD specific types

Definition at line 88 of file ivdfs.h.


Function Documentation

int alloc_hsmfs_inode_info ( struct inode *  inode  ) 
int free_hsmfs_inode_info ( struct inode *  inode  ) 

Definition at line 177 of file ivdfs_super.c.

References DBG_II_DETAIL, hsm_ii_cache_p, ivd_alert, ivd_dbg, ivd_ii, ivdfs_bad_cookie(), and NULL.

{
    ivd_inode_info_t *hsmfs_ii = ivd_ii(inode);

    ivd_dbg(DBG_II_DETAIL, "ino=%lu (%u) i_p: 0x%p ii_p: 0x%p",
            inode->i_ino,
            inode->i_generation,
            inode,
            hsmfs_ii);

    if (hsmfs_ii == NULL) {
        return 0;
    }

    if (ivdfs_bad_cookie(hsmfs_ii)) {
        ivd_alert(
            "[CRITICAL] i->u.generic_ip contains non HSMFS data. Won't deallocate: ino=%lu (%u)",
            inode->i_ino, inode->i_generation);
        return -EFAULT;
    }

    kmem_cache_free(hsm_ii_cache_p, ivd_ii(inode));
    inode->i_private = NULL;

    return 0;
}

Here is the call graph for this function:

struct inode * hsmfs_iget ( struct super_block *  sb,
unsigned long  ino 
) [read]

Referenced by iopen_lookup(), and ivdfs_iopen_check().

Here is the caller graph for this function:

void ivd_cleanup_comm ( ivd_comm_t ic  ) 

Referenced by ivdfs_dev_release().

Here is the caller graph for this function:

void ivd_comm_dump_state ( void   ) 

Referenced by ivdfs_dev_ioctl().

Here is the caller graph for this function:

ivd_comm_t * ivd_find_comm ( dev_t  dev  ) 

Referenced by ivdfs_kill_sb().

Here is the caller graph for this function:

ivd_comm_t * ivd_get_comm ( dev_t  dev  ) 

Referenced by ivdfs_get_sb().

Here is the caller graph for this function:

ivd_fs_t * ivd_get_fs ( char *  fstype  ) 

Referenced by ivdfs_get_sb().

Here is the caller graph for this function:

void ivd_initialize_comm ( ivd_comm_t ic  ) 
void ivd_put_comm ( ivd_comm_t ic  ) 

Referenced by ivdfs_get_sb(), and ivdfs_kill_sb().

Here is the caller graph for this function:

void ivd_put_fs ( ivd_fs_t fs  ) 

Referenced by ivdfs_get_sb(), and ivdfs_kill_sb().

Here is the caller graph for this function:

int ivdfs_attach ( ivd_comm_t ic,
struct inode *  inode 
)
static int ivdfs_bad_cookie ( ivd_inode_info_t ii  )  [inline, static]

Definition at line 378 of file ivdfs.h.

References ivd_inode_info_t::cookie, hsmfs_cookie, and NULL.

Referenced by free_hsmfs_inode_info().

                                                         {
    if (ii == NULL || ii->cookie == NULL) {
        return 1;
    }
    return memcmp(ii->cookie, hsmfs_cookie, sizeof(ii->cookie)) != 0;
}

Here is the caller graph for this function:

sector_t ivdfs_bmap ( struct address_space *  mapping,
sector_t  sect 
)

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

void ivdfs_clear_inode ( struct inode *  inode  ) 

This function is called when VFS wants to clear inode.

Cleanup of hsmfs inode info is done in this function.

int ivdfs_comm_add_req ( ivd_comm_t ic,
ivd_req_t req,
int  reqsize,
unsigned int  flags 
)
void ivdfs_comm_exit ( void   ) 

Referenced by ivdfs_exit().

Here is the caller graph for this function:

int ivdfs_comm_init ( void   ) 

Referenced by ivdfs_init().

Here is the caller graph for this function:

static int ivdfs_comm_wait_reply ( ivd_comm_t ic,
ivd_req_entry_t re 
) [static]

Definition at line 71 of file ivdfs_comm.c.

References ivd_req_hdr_t::code, DBG_COMM, DBG_COMM_DETAIL, ivd_req_entry_t::flags, ivd_req_t::hdr, ivd_dbg, IVD_EF_REPLY, IVD_FREE, ivd_warn, ivdfs_evt_cancel_req(), ivd_comm_t::minor, ivd_req_entry_t::posttime, ivd_req_entry_t::req, ivd_req_hdr_t::reqid, ivd_comm_t::timeout, and ivd_req_entry_t::waitq.

{
    int ret = 0;
    DECLARE_WAITQUEUE(wait, current);

    ivd_dbg(DBG_COMM,
            "<%u> [%u] wait for reply (post=%lu, timeout=%lu)",
            ic->minor, re->req->hdr.reqid, re->posttime, ic->timeout);

    /* put process on wait queue and wait for reply */
    add_wait_queue(&re->waitq, &wait);

    while (!(re->flags & IVD_EF_REPLY)) {

        unsigned long cj = jiffies;
        int timeout_passed = 0;

        set_current_state(TASK_INTERRUPTIBLE);

        ivd_dbg(DBG_COMM_DETAIL,
                "<%u> [%u] pid=%u sleeping (curr=%lu)...",
                ic->minor, re->req->hdr.reqid, current->pid, jiffies);

        if (signal_pending(current)) {
            ivd_dbg(DBG_COMM,
                "<%u> [%u] Pending signal. Stop waiting.",
                ic->minor, re->req->hdr.reqid);
            break;
        }

        /* We are taking the overflow into account in the following condition:
           p+t can be less than p if the sum overflows.

           Timeout is false if cj hasn't overflown yet (cj > p),
           but p+t overflows (<p). (default value)

           In all other cases the condition is calculated in the same way:
              timeout = (p+t) > cj
        */

        if ((re->posttime + ic->timeout) > re->posttime || cj < re->posttime) {
            timeout_passed = (re->posttime + ic->timeout) < cj;
        }

        if (timeout_passed) {
            ivd_dbg(DBG_COMM,
                "<%u> [%u] Timeout (post=%lu, timeout=%lu, cj=%lu)",
                ic->minor, re->req->hdr.reqid, re->posttime, ic->timeout, cj);
            break;
        }

        schedule_timeout(ic->timeout - (cj - re->posttime) + 1);
    }

    /* back in business - we got reply, signal or timeout */
    set_current_state(TASK_RUNNING);
    remove_wait_queue(&re->waitq, &wait);

    if (re->flags & IVD_EF_REPLY) {
        /* return code from user space */
        ivd_dbg(DBG_COMM, "<%u> [%u] got reply - code=%d",
                ic->minor, re->req->hdr.reqid, re->req->hdr.code);
        ret = re->req->hdr.code;

        IVD_FREE(re->req);
        IVD_FREE(re);

    }
    else if (signal_pending(current)) {
        ivd_warn("<%u> [%u] signaled when waiting for reply [%d:%d]",
                 ic->minor, re->req->hdr.reqid, current->pid, task_pgrp_nr(current));
        ret = -ERESTARTSYS;
    }
    else {
        ivd_warn("<%u> [%u] timeout waiting for reply (post=%lu, curr=%lu)",
                 ic->minor, re->req->hdr.reqid, re->posttime, jiffies);
        ivdfs_evt_cancel_req(ic, re->req->hdr.reqid);
        ret = -ERESTARTSYS;
    }

    return ret;
}

Here is the call graph for this function:

int ivdfs_create ( struct inode *  dir,
struct dentry *  dentry,
int  mode,
struct nameidata *  nd 
)

Referenced by ivdfs_set_d_inode_ops().

Here is the caller graph for this function:

int ivdfs_data_state ( ivd_comm_t ic,
unsigned int  cmd,
UInt64_t  id_fs,
UInt64_t  file_id,
UInt64_t  chunk_size,
UInt64_t  chunk_offset,
UInt32_t  mod_time 
)

Referenced by ivdfs_dev_ioctl().

Here is the caller graph for this function:

void ivdfs_delete_inode ( struct inode *  inode  ) 
static int ivdfs_dev_ioctl ( struct inode *  inode,
struct file file,
unsigned int  cmd,
unsigned long  arg 
) [static]

Definition at line 514 of file ivdfs_comm.c.

References ivd_ioc_lockfile_t::chg_time, ivd_ioc_triggevent_t::chunk_offset, ivd_ioc_datastate_t::chunk_offset, ivd_ioc_triggevent_t::chunk_size, ivd_ioc_datastate_t::chunk_size, ivd_ioc_lockfile_t::chunk_size, ivd_ioc_setfileid_t::chunk_size, DBG_COMM_DETAIL, DBG_MAIN, ivd_ioc_triggevent_t::evt, ivd_ioc_datastate_t::file_id, ivd_ioc_lockfile_t::file_id, ivd_ioc_setfileid_t::file_id, ivd_ioc_lockfile_t::flags, HSM_IOC_DATA_CLEAN, HSM_IOC_DATA_OFFLINE, HSM_IOC_DATA_ONLINE, HSM_IOC_DUMP_STATE, HSM_IOC_GET_FILE_INFO, HSM_IOC_GET_FILEID, HSM_IOC_LOCK_FILE, HSM_IOC_MOD_COUNT, HSM_IOC_SET_DEBUG, HSM_IOC_SET_FILEID, HSM_IOC_SET_INVIO_PID, HSM_IOC_SET_OPMODE, HSM_IOC_SET_TIMEOUT, HSM_IOC_TRIGGER_EVENT, HSM_IOC_UNLOCK_FILE, hsmfs_debug, ivd_ioc_triggevent_t::id_fs, ivd_ioc_datastate_t::id_fs, ivd_ioc_fileinfo_t::id_fs, ivd_ioc_lockfile_t::id_fs, ivd_ioc_setfileid_t::id_fs, ivd_comm_dump_state(), ivd_dbg, IVD_FILE_INO, ivd_info, ivd_warn, ivdfs_data_state(), ivdfs_get_fileid(), ivdfs_get_fileinfo(), ivdfs_lock_file(), ivdfs_set_fileid(), ivdfs_setopmode(), ivdfs_trigger_event(), ivd_comm_t::minor, ivd_ioc_datastate_t::mod_time, ivd_ioc_lockfile_t::op, ivd_ioc_opmode_t::operation_mode, ivd_ioc_opmode_t::recall_on_open, ivd_comm_t::sem, ivd_comm_t::tgid, ivd_comm_t::timeout, and ivd_ioc_opmode_t::WORM_timeout.

{
    ivd_comm_t *ic = (ivd_comm_t *)file->private_data;
    int ret = 0;

    ivd_dbg(DBG_COMM_DETAIL, "<%u> cmd=0x%X", ic->minor, cmd);

    down_read(&ic->sem);

    switch(cmd) {
    case HSM_IOC_MOD_COUNT: {
        int count = (int)arg;

        ivd_dbg(DBG_MAIN, "<%u> change module usage count: %d",
                ic->minor, count);
#if 0
        /* TODO: What's the purpose of this? Do we need to take care in Linux 2.6? */
        /* There is no module use count available any more */
        while (count > 0) {
            MOD_INC_USE_COUNT;
            count--;
        }
        while (count < 0) {
        /* TODO: What's the purpose of this? Do we need to take care in Linux 2.6? */
            MOD_DEC_USE_COUNT;
            count++;
        }
#endif
        goto out;
    }

    case HSM_IOC_SET_DEBUG: {
        unsigned int debug = arg;
        ivd_dbg(DBG_MAIN, "<%u> change debug level: 0x%08X",
                ic->minor, debug);

        ivd_dbg(DBG_MAIN, " old value = 0x%08lX", hsmfs_debug);
        hsmfs_debug = debug;
        goto out;
    }

    case HSM_IOC_SET_TIMEOUT: {
        unsigned short timeout = (unsigned short)arg;

        ivd_dbg(DBG_COMM_DETAIL, "<%u> change event timeout: %hu sec",
                ic->minor, timeout);

        if (timeout == 0) {
            ivd_dbg(DBG_COMM_DETAIL, "  invalid value (should be > 0)");
        }
        else {
            ivd_dbg(DBG_COMM_DETAIL, "  old value = %lu jiffies", ic->timeout);
            ic->timeout = timeout * HZ;
            ivd_dbg(DBG_COMM_DETAIL, "  new value = %lu jiffies", ic->timeout);
        }

        goto out;
    }

    case HSM_IOC_DUMP_STATE: {
        ivd_dbg(DBG_MAIN, "<%u> dump state", ic->minor);

        ivd_comm_dump_state();

        goto out;
    }

    case HSM_IOC_SET_OPMODE: {
        ivd_ioc_opmode_t in;

        if (copy_from_user(&in, (char *)arg, sizeof(in))) {
            ret = -EFAULT;
            goto out;
        }

        ret = ivdfs_setopmode(  ic,
                                in.operation_mode,
                                in.WORM_timeout,
                                (in.recall_on_open != 0));

        goto out;
    }

    case HSM_IOC_SET_FILEID: {
        ivd_ioc_setfileid_t in;

        if (copy_from_user(&in, (char *)arg, sizeof(in))) {
            ret = -EFAULT;
            goto out;
        }

        ivd_dbg(DBG_COMM_DETAIL, "<%u> set file ID: ino=%u, fid=%llu",
            ic->minor, IVD_FILE_INO(in.id_fs), in.file_id);

        ret = ivdfs_set_fileid(ic, in.id_fs, in.file_id, in.chunk_size);

        goto out;
    }

    case HSM_IOC_GET_FILEID: {
        ivd_ioc_setfileid_t in;

        if (copy_from_user(&in, (char *)arg, sizeof(in))) {
            ret = -EFAULT;
            goto out;
        }

        ret = ivdfs_get_fileid(ic, in.id_fs, &in.file_id, &in.chunk_size);
        if (ret)
            goto out;

        if (copy_to_user((char *)arg, &in, sizeof(in))) {
            ret = -EFAULT;
        }

        goto out;
    }

    case HSM_IOC_LOCK_FILE:
    case HSM_IOC_UNLOCK_FILE: {
        ivd_ioc_lockfile_t in;

        if (copy_from_user(&in, (char *)arg, sizeof(in))) {
            ret = -EFAULT;
            goto out;
        }

        ret = ivdfs_lock_file(ic, cmd,
                              in.id_fs, in.file_id, in.op,
                              &in.chg_time, &in.chunk_size, &in.flags);
        if (ret)
            goto out;

        if (copy_to_user((char *)arg, &in, sizeof(in))) {
            ret = -EFAULT;
        }

        goto out;
    }

    case HSM_IOC_GET_FILE_INFO: {
        ivd_ioc_fileinfo_t in;

        if (copy_from_user(&in, (char *)arg, sizeof(in))) {
            ret = -EFAULT;
            goto out;
        }

        ivd_dbg(DBG_COMM_DETAIL, "<%u> get file info: ino=%u",
                ic->minor, IVD_FILE_INO(in.id_fs));

        ret = ivdfs_get_fileinfo(ic, IVD_FILE_INO(in.id_fs), &in);
        if (ret)
            goto out;

        if (copy_to_user((char *)arg, &in, sizeof(in))) {
            ret = -EFAULT;
        }

        goto out;
    }

    case HSM_IOC_DATA_CLEAN:
    case HSM_IOC_DATA_ONLINE:
    case HSM_IOC_DATA_OFFLINE: {
        ivd_ioc_datastate_t in;

        memset(&in, 0, sizeof(in));
        if (copy_from_user(&in, (char *)arg, sizeof(in))) {
            ret = -EFAULT;
            goto out;
        }

        ret = ivdfs_data_state(ic, cmd,
                               in.id_fs, in.file_id,
                               in.chunk_size, in.chunk_offset,
                               in.mod_time);

        goto out;
    }

    case HSM_IOC_TRIGGER_EVENT: {
        ivd_ioc_triggevent_t in;

        memset(&in, 0, sizeof(in));
        if (copy_from_user(&in, (char *)arg, sizeof(in))) {
            ret = -EFAULT;
            goto out;
        }

        ivd_dbg(DBG_COMM_DETAIL, "<%u> trig event %u ch_size=%llu, ch_off=%llu",
                ic->minor, in.evt, in.chunk_size, in.chunk_offset);
        ret = ivdfs_trigger_event(ic, in.evt, in.id_fs,
                                  in.chunk_size, in.chunk_offset);

        goto out;
    }

    case HSM_IOC_SET_INVIO_PID: {
        int invio_pid = (int)arg;

        ivd_info( "<%u> change invio old pid : %d, new pid : %d",
                ic->minor, ic->tgid, invio_pid);

        ic->tgid = invio_pid;
        goto out;
    }

    default:
        ivd_warn("<%u> invalid ioctl() - cmd=0x%X", ic->minor, cmd);
        ret = -EINVAL;
        goto out;
    }

out:
    up_read(&ic->sem);
    return ret;
}

Here is the call graph for this function:

static int ivdfs_dev_open ( struct inode *  inode,
struct file file 
) [static]

Definition at line 735 of file ivdfs_comm.c.

References DBG_COMM_DETAIL, ivd_comm_t::dev, hsmfs_dev_major, ivd_alert, ivd_dbg, ivd_info, MAX_IVDFS, ivd_comm_t::minor, minor, ivd_comm_t::pid, ivd_comm_t::sem, and ivd_comm_t::tgid.

{
    int ret = 0;
    int minor = MINOR(inode->i_rdev);
    ivd_comm_t *ic = &ivd_comm[minor];

    ivd_dbg(DBG_COMM_DETAIL, "<%u>", minor);

    if (minor >= MAX_IVDFS) {
        ivd_alert("pseudo device minor number (%d) too big", minor);
        return -ENODEV;
    }

    down_write(&ic->sem);

    /* allow only one userspace reader/writer */
    if (ic->pid) {
        ret = -EIVDBUSY;
        ivd_dbg(DBG_COMM_DETAIL, "ivdfs_dev_open:allow only one userspace reader/writer RC= %d", ret );
        goto out;
    }

    ic->minor = minor;
    ic->pid = current->pid;
    ic->tgid = task_pgrp_nr(current);

    /* store pointer to ivd_comm_t structure in file structure */
    file->private_data = ic;

    {
        char b[BDEVNAME_SIZE];
        ivd_info("%s: device %u:%u opened by [%d:%d]",
            ic->dev == 0 ? "nofs" : __bdevname(ic->dev, b),
            hsmfs_dev_major, minor, ic->pid, ic->tgid);
    }
out:
    up_write(&ic->sem);

    return ret;
}

static unsigned int ivdfs_dev_poll ( struct file file,
struct poll_table_struct *  wait 
) [static]

Definition at line 493 of file ivdfs_comm.c.

References DBG_COMM_DETAIL, ivd_dbg, ivd_comm_t::lock, ivd_comm_t::minor, ivd_comm_t::reqs_pending, and ivd_comm_t::waitq.

{

    ivd_comm_t *ic = (ivd_comm_t *)file->private_data;
    unsigned int mask = POLLOUT | POLLWRNORM; /* can write anytime */

    ivd_dbg(DBG_COMM_DETAIL, "<%u>", ic->minor);

    poll_wait(file, &(ic->waitq), wait);

    spin_lock(&ic->lock);
    if (!list_empty(&ic->reqs_pending)) {
        ivd_dbg(DBG_COMM_DETAIL, "<%u> requests pending!", ic->minor);
        mask |= POLLIN | POLLRDNORM;
    }
    spin_unlock(&ic->lock);

    return mask;
}

static ssize_t ivdfs_dev_read ( struct file file,
char __user *  buf,
size_t  nbytes,
loff_t *  off 
) [static]

Definition at line 301 of file ivdfs_comm.c.

References ivd_comm_t::cnt_chg_attr, ivd_comm_t::cnt_chg_data, ivd_comm_t::cnt_chg_meta, ivd_comm_t::cnt_chg_name, ivd_comm_t::cnt_data_offl, DBG_COMM, DBG_COMM_DETAIL, ivd_comm_t::dev, ivd_comm_t::evt_alert_time, ivd_req_entry_t::flags, ivd_req_t::hdr, HSM_EVT_CHG_ATTR, HSM_EVT_CHG_DATA, HSM_EVT_CHG_META, HSM_EVT_CHG_NAME, HSM_EVT_DATA_OFFL, ivd_alert, ivd_dbg, IVD_EF_NONBLOCK, IVD_EF_SYNC, IVD_FREE, ivd_nul_time, ivd_warn, ivd_comm_t::last_apointment, ivd_comm_t::last_hsm_read, ivd_req_entry_t::list, ivd_comm_t::lock, ivd_comm_t::message_counter, ivd_comm_t::minor, NULL, ivd_req_entry_t::req, ivd_req_hdr_t::reqid, ivd_comm_t::reqs_pending, ivd_comm_t::reqs_waitreply, ivd_req_entry_t::reqsize, ivd_comm_t::sb, size, ivd_comm_t::sleep_counter, ivd_comm_t::sleepq, ivd_req_hdr_t::type, and ivd_comm_t::waitq.

{
    ssize_t size, ret = 0;
    unsigned int reqid = 0;
    unsigned int flags = 0;
    ivd_comm_t *ic = (ivd_comm_t *)file->private_data;
    ivd_req_entry_t *re = NULL;
    DECLARE_WAITQUEUE(wait, current);

    ivd_dbg(DBG_COMM_DETAIL, "<%u> nbytes=%lu", ic->minor, nbytes);

    /* if nothing to read - return */
    if (nbytes == 0)
        goto out;

    spin_lock(&ic->lock);
    ivd_dbg(DBG_COMM_DETAIL, "messages=%lu sleeping=%lu apointment=%lu",
        ic->message_counter, ic->sleep_counter, ic->last_apointment);

    if (ic->message_counter == 0)  {
        spin_unlock(&ic->lock);
        /* put process on wait queue in case there is nothing to send */
        add_wait_queue(&ic->waitq, &wait);
        set_current_state(TASK_INTERRUPTIBLE);

        spin_lock(&ic->lock);

        while (list_empty(&ic->reqs_pending)) {
            ivd_dbg(DBG_COMM_DETAIL, "empty message que. interupt sleepq.");
            ic->last_hsm_read = 0; // no more events
            wake_up_interruptible(&ic->sleepq);
            if (signal_pending(current)) {
                ret = -ERESTARTSYS;
                break;
            }
            /*
            TODO: Is this necessary at all? Linux 2.6 is preemptive kernel...
            */
            spin_unlock(&ic->lock);
            schedule();
            spin_lock(&ic->lock);
        }

        /* back in business - we got a pending request or signal */
        set_current_state(TASK_RUNNING);
        remove_wait_queue(&ic->waitq, &wait);

        /* signal received - return */
        if (ret) {
            spin_unlock(&ic->lock);
            goto out;
        }
    }
    /* take next request from list of pending requests */
    re = list_entry(ic->reqs_pending.next, ivd_req_entry_t, list);
    list_del(&re->list);

    ivd_dbg(DBG_COMM_DETAIL, "Reading event type: %u", re->req->hdr.type);

    flags = re->flags;
    --(ic->message_counter);
    switch (re->req->hdr.type) {
        case HSM_EVT_CHG_NAME:  ic->cnt_chg_name--; break;
        case HSM_EVT_CHG_ATTR:  ic->cnt_chg_attr--; break;
        case HSM_EVT_CHG_META:  ic->cnt_chg_meta--; break;
        case HSM_EVT_CHG_DATA:  ic->cnt_chg_data--; break;
        case HSM_EVT_DATA_OFFL: ic->cnt_data_offl--; break;
    }
    /* if queue is empty and alert was sent, alert again */
    if ( ic->message_counter == 0 && !timespec_equal(&(ic->evt_alert_time), &(ivd_nul_time)) ) {
        ivd_alert("%s: event queue empty",
                  ic->dev == 0 ? "nofs" : ic->sb->s_id);
        ic->evt_alert_time = ivd_nul_time;
    }

    ic->last_hsm_read = jiffies;

    spin_unlock(&ic->lock);

    /* userspace should have buffer big enough to receive complete request */
    size = re->reqsize;
    if (nbytes < size) {
        ivd_warn("<%u> buffer too small (%lu, but %lu required)",
                 ic->minor, nbytes, size);
        size = nbytes;
    }

    reqid = re->req->hdr.reqid;

    if (copy_to_user(buf, re->req, size)) {
        ret = -EFAULT;
        goto out;
    }

    if (re->flags & IVD_EF_SYNC) {
        spin_lock(&ic->lock);
        list_add(&re->list, ic->reqs_waitreply.prev);
        spin_unlock(&ic->lock);
        re = NULL; /* do not remove request entry */
    }

    ret = size;

out:
    ivd_dbg(DBG_COMM_DETAIL, "<%u> [%u] sent=%lu", ic->minor, reqid, ret);

    /* free request entry if set */
    if (re != NULL) {
        IVD_FREE(re->req);
        IVD_FREE(re);
    }

    if (flags & IVD_EF_NONBLOCK) {
        ivd_dbg(DBG_COMM, "<%u> [%u] non-blocking request removed",
                ic->minor, reqid);
    }

    return ret;
}

static int ivdfs_dev_release ( struct inode *  inode,
struct file file 
) [static]

Definition at line 777 of file ivdfs_comm.c.

References DBG_COMM_DETAIL, ivd_comm_t::dev, HSM_ERR_HSM_CLOSED_d, hsmfs_dev_major, ivd_alert, ivd_cleanup_comm(), ivd_dbg, ivd_info, ivdfs_evt_log_error(), ivd_comm_t::message_counter, ivd_comm_t::minor, ivd_comm_t::pid, ivd_comm_t::sb, ivd_comm_t::sem, ivd_comm_t::sleep_counter, and ivd_comm_t::tgid.

{
    int ret = 0;
    ivd_comm_t *ic = (ivd_comm_t *)file->private_data;

    ivd_dbg(DBG_COMM_DETAIL, "<%u>", ic->minor);

    down_write(&ic->sem);

    /* TODO: what to do with pending requests on release? */
    ic->pid = 0;
    ic->tgid = 0;

    ivd_info("%s: device %u:%u closed by [%d:%d]",
             ic->dev == 0 ? "nofs" : ic->sb->s_id,
             hsmfs_dev_major, MINOR(inode->i_rdev),
             current->pid, task_pgrp_nr(current));

    // check if FS still mounted -> HSM has probably died
    if (ic->minor > 0 && ic->sb) {
        ivd_alert("%s: [CRITICAL] HSM not listening for FS events! "
                  "Unmount FS and check logs for more details! # messages in que=%lu, # of sleeping users=%lu.",
                  ic->sb->s_id,
                  ic->message_counter,
                  ic->sleep_counter);
        ivdfs_evt_log_error(HSM_ERR_HSM_CLOSED_d, ic);
    }

    up_write(&ic->sem);

    /* if FS not mounted anymore -> cleanup queues */
    if (!ic->sb) {
        ivd_cleanup_comm(ic);
    }

    return ret;
}

Here is the call graph for this function:

static ssize_t ivdfs_dev_write ( struct file file,
const char __user *  buf,
size_t  nbytes,
loff_t *  off 
) [static]

Definition at line 422 of file ivdfs_comm.c.

References DBG_COMM, DBG_COMM_DETAIL, ivd_req_entry_t::flags, ivd_dbg, ivd_err, IVD_FREE, ivd_req_entry_t::list, ivd_comm_t::lock, ivd_comm_t::minor, NULL, ivd_req_entry_t::req, ivd_comm_t::reqs_waitreply, and ivd_req_entry_t::waitq.

{
    ssize_t ret = 0;
    ivd_comm_t *ic = (ivd_comm_t *)file->private_data;
    ivd_req_entry_t *re = NULL;
    ivd_req_entry_t *tmp;
    struct list_head *lh;
    ivd_req_hdr_t hdr;

    ivd_dbg(DBG_COMM_DETAIL, "<%u> nbytes=%lu", ic->minor, nbytes);

    /* check if write includes at least req hdr */
    if (nbytes < sizeof(hdr)) {
        ivd_err("<%u> buffer too small (%lu, but %lu required)",
                ic->minor, nbytes, sizeof(hdr));
        return -EINVAL;
    }

    if (copy_from_user(&hdr, buf, sizeof(hdr))) {
        memset(&hdr, 0, sizeof(hdr));
        ret = -EFAULT;
        goto out;
    }

    spin_lock(&ic->lock);
    list_for_each(lh, &ic->reqs_waitreply) {
        tmp = list_entry(lh, ivd_req_entry_t, list);
        if (tmp->req->hdr.reqid == hdr.reqid) {
            re = tmp;
            break;
        }
    }

    if (!re) {
        spin_unlock(&ic->lock);

        ivd_dbg(DBG_COMM, "<%u> [%u] got reply on wrong request! Probably async data offline.", ic->minor, hdr.reqid);
        ret = nbytes;
        goto out;
    }

    /* copy response header into request */
    memcpy(re->req, &hdr, sizeof(hdr));

    re->flags |= IVD_EF_REPLY;

    /* remove it from wait list */
    list_del(&re->list);
    spin_unlock(&ic->lock);

    if (waitqueue_active(&re->waitq)) {
        wake_up_interruptible(&re->waitq);
    }
    else
    {
        /* nobody is waiting -> remove it */
        IVD_FREE(re->req);
        IVD_FREE(re);
    }

    /* confirm that everything is read */
    ret = nbytes;

out:
    ivd_dbg(DBG_COMM_DETAIL, "<%u> [%u] got=%lu", ic->minor, hdr.reqid, ret);

    return ret;

}

ssize_t ivdfs_direct_IO ( int  rw,
struct kiocb *  kiocb,
const struct iovec *  iov,
loff_t  offset,
unsigned long  nr_segs 
)

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

void ivdfs_dirty_inode ( struct inode *  inode  ) 
void ivdfs_drop_inode ( struct inode *  inode  ) 

This function is called when the last access to the inode is dropped, with the inode_lock spinlock held.

New in 2.6.

int ivdfs_evt_cancel_req ( ivd_comm_t ic,
int  reqid 
)

Referenced by ivdfs_comm_wait_reply().

Here is the caller graph for this function:

int ivdfs_evt_chg_attr ( struct dentry *  de  ) 
int ivdfs_evt_chg_data ( struct inode *  inode,
loff_t  off,
size_t  size 
)
int ivdfs_evt_chg_name ( struct dentry *  de,
struct dentry *  de_old 
)
int ivdfs_evt_data_offl ( struct dentry *  de,
loff_t  off,
size_t  size,
int  cause 
)
int ivdfs_evt_log_error ( int  code,
ivd_comm_t ic 
)

Referenced by ivdfs_dev_release().

Here is the caller graph for this function:

int ivdfs_evt_mount ( ivd_comm_t ic,
dev_t  fs_device,
const char *  dev_name,
int  code 
)

Referenced by ivdfs_get_sb().

Here is the caller graph for this function:

int ivdfs_evt_open ( struct file file  ) 
int ivdfs_evt_pre_mount ( ivd_comm_t ic,
dev_t  dev,
unsigned short  comm_minor,
const char *  dev_name 
)

Referenced by ivdfs_get_sb().

Here is the caller graph for this function:

int ivdfs_evt_release ( struct file file  ) 
void ivdfs_evt_simulate_create ( struct dentry *  de  ) 
int ivdfs_evt_umount ( ivd_comm_t ic,
struct super_block *  sb 
)
static void __exit ivdfs_exit ( void   )  [static]

Definition at line 484 of file ivdfs_mod.c.

References ivd_info, ivdfs_comm_exit(), and ivdfs_slab_destroy().

{
    ivdfs_comm_exit();

    unregister_filesystem(&hsmfs_fstype);

    ivdfs_slab_destroy();

    ivd_info("bye, bye!");
}

Here is the call graph for this function:

int ivdfs_file_aio_fsync ( struct kiocb *  kiocb,
int  datasync 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

ssize_t ivdfs_file_aio_read ( struct kiocb *  kiocb,
const struct iovec *  iovec,
unsigned long  size,
loff_t  offset 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

ssize_t ivdfs_file_aio_write ( struct kiocb *  kiocb,
const struct iovec *  iovec,
unsigned long  size,
loff_t  offset 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

int ivdfs_file_fasync ( int  fd,
struct file file,
int  on 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

int ivdfs_file_flock ( struct file file,
int  cmd,
struct file_lock *  file_lock 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

int ivdfs_file_flush ( struct file file,
fl_owner_t  id 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

int ivdfs_file_fsync ( struct file file,
struct dentry *  de,
int  datasync 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

unsigned long ivdfs_file_get_unmapped_area ( struct file file,
unsigned long  addr,
unsigned long  len,
unsigned long  offset,
unsigned long  flags 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

int ivdfs_file_ioctl ( struct inode *  inode,
struct file file,
unsigned int  cmd,
unsigned long  arg 
)

Referenced by ivdfs_set_d_file_ops(), and ivdfs_set_f_file_ops().

Here is the caller graph for this function:

int ivdfs_file_lock ( struct file file,
int  cmd,
struct file_lock *  file_lock 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

int ivdfs_file_mmap ( struct file file,
struct vm_area_struct *  vma 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

int ivdfs_file_open ( struct inode *  inode,
struct file file 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

ssize_t ivdfs_file_read ( struct file file,
char __user *  buf,
size_t  size,
loff_t *  offset 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

int ivdfs_file_release ( struct inode *  inode,
struct file file 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

ssize_t ivdfs_file_sendpage ( struct file file,
struct page *  page,
int  offset,
size_t  size,
loff_t *  pos,
int  more 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

ssize_t ivdfs_file_write ( struct file file,
const char __user *  buf,
size_t  size,
loff_t *  offset 
)

Referenced by ivdfs_set_f_file_ops().

Here is the caller graph for this function:

void ivdfs_follow_link ( struct dentry *  de,
struct nameidata *  nd 
)
int ivdfs_freeze_fs ( struct super_block *  sb  ) 
int ivdfs_get_fileid ( ivd_comm_t ic,
UInt64_t  id_fs,
UInt64_t file_id,
UInt64_t chunk_size 
)

Referenced by ivdfs_dev_ioctl().

Here is the caller graph for this function:

int ivdfs_get_fileinfo ( ivd_comm_t ic,
unsigned long  ino,
ivd_ioc_fileinfo_t fi 
)

Referenced by ivdfs_dev_ioctl().

Here is the caller graph for this function:

static int ivdfs_get_path ( struct dentry *  de,
char *  buf,
int  buflen 
) [static]

Definition at line 63 of file ivdfs_events.c.

References ALIGN_FILE, DBG_EVT, DBG_EVT_DETAIL, ivd_file_t::file_id, hsmfs_new_on_open, ivd_file_t::id_fs, ivd_dbg, ivd_err, IVD_FILE_ID_FS, ivd_ii, IVD_IIF_NEW_ENTRY, ivdfs_NEW_ON_OPEN_ALL_d, ivd_file_t::len, len, ivd_path_t::levels, ivd_file_t::name, and NULL.

{
    int len;
    int pathlen = 0;
    unsigned short level = 0;
    ivd_file_t *f;
    ivd_path_t *p;
    char *pos = buf;

    ivd_dbg(DBG_EVT, "de=%s buf=%p buflen=%d", de ? de->d_name.name : NULL, buf, buflen);

    /* skip path header (levels) - fill at the end */
    pos += sizeof(ivd_path_t) - sizeof(ivd_file_t);

//#warning "dcache lock is locked for each of the events --> hsmfs slows down the system"

    if (de) {
        spin_lock(&dcache_lock);

        do {
            level++;
            ivd_dbg(DBG_EVT_DETAIL, "%d:&de=%p, ino=%lu (%u) name=\"%s\"",
                    level,
                    de,
                    de->d_inode ? de->d_inode->i_ino : 0,
                    de->d_inode ? de->d_inode->i_generation : 0,
                    de->d_name.name); 

        if (de->d_inode != NULL && ivd_ii(de->d_inode) == NULL){
                ivd_err("Unexpected NULL pointer in ivd_ii(de->d_inode): level=%d inode=%lu", level, de->d_inode->i_ino);
                spin_unlock(&dcache_lock);
                return -EINVAL;
            }

            /* 4455 fix */
            if ( (level > 1)                                            // file's parents
                && (hsmfs_new_on_open == ivdfs_NEW_ON_OPEN_ALL_d)       // new-on-open mode 2
                && (ivd_ii(de->d_inode)->flags & IVD_IIF_NEW_ENTRY) ) { // no EAs up to now
                ivd_dbg(DBG_EVT_DETAIL, "New entry flag removed.");
                ivd_ii(de->d_inode)->flags &= ~IVD_IIF_NEW_ENTRY;
            }

            f = (ivd_file_t *)pos;
            if (de->d_inode) {
                f->id_fs    = IVD_FILE_ID_FS(de->d_inode->i_ino,
                                             de->d_inode->i_generation);
                f->file_id  = ivd_ii(de->d_inode)->file_id;
            }
            else {
                f->id_fs    = 0;
                f->file_id  = 0;
            }
            pathlen += f->len = de->d_name.len+1;

            len = ALIGN_FILE(sizeof(ivd_file_t) + f->len);

            /* To prevent buffer overrun  (Bug 3453)*/
            if ( (pos + len - buf) > buflen ) {
                ivd_err("IVD path buffer too small (%d, but %ld required). Event ignored.", buflen, (pos + len - buf));
                spin_unlock(&dcache_lock);
                return -ENAMETOOLONG;
            }
            memcpy(f->name, de->d_name.name, f->len);

            pos += len;

            de = de->d_parent;

        } while (!IS_ROOT(de));

        spin_unlock(&dcache_lock);
    }

    p = (ivd_path_t *)buf;
    p->levels = level;

    return(pos - buf);
}

int ivdfs_get_sb ( struct file_system_type *  fst,
int  flags,
const char *  dev_name,
void *  data,
struct vfsmount *  mnt 
)

The mount function of the file system.

Returns:
Error code. Value 0 means success.

Definition at line 153 of file ivdfs_mod.c.

References ivd_fs_t::b_fst, DBG_MAIN, ivd_fs_t::flags, ivd_comm_t::fs, FSTYPE_SLEN, HSM_OPMODE_REGULAR, hsmfs_timeout, ivd_alert, IVD_BFS_NEEDS_USER_XATTR, ivd_dbg, ivd_err, ivd_get_comm(), ivd_get_fs(), ivd_info, ivd_put_comm(), ivd_put_fs(), ivdfs_evt_mount(), ivdfs_evt_pre_mount(), ivdfs_parse_options(), ivdfs_set_inode_ops(), ivdfs_set_super_ops(), ivdfs_setopmode(), ivd_comm_t::minor, NULL, and ivd_comm_t::sb.

{

    void *options = NULL;
    int opt_len = 0;

    dev_t   fs_device = 0;
    char    base_fs_name[FSTYPE_SLEN+1] = "ext3";  // if not specified, use ext3
    int     retVal = 0;

    ivd_fs_t    *ifs = NULL;
    ivd_comm_t  *ic = NULL;
    int ret;

    ivd_dbg(DBG_MAIN, "%s: mounting (fst->name=%s).", dev_name, fst->name);

    if (!ivdfs_parse_options(data, base_fs_name))
        goto err;

    if (data != NULL) {
        opt_len += strlen(data)+1;
    }

    /* get bottom FS type in internal fs_ops table */
    ifs = ivd_get_fs(base_fs_name);
    if (ifs == NULL) {
        goto err;
    }

    ivd_dbg(DBG_MAIN, "%s: acquiring device ids", dev_name);
    /* Get device numbers from dev_name*/
    {
        struct block_device     *bdev = NULL;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
        bdev = open_bdev_excl(dev_name, flags, ifs->b_fst);
        if (IS_ERR(bdev)) {
            ivd_dbg(DBG_MAIN, "%s: open_bdev_excl returned %ld", dev_name, PTR_ERR(bdev));
            return PTR_ERR(bdev);
        }
        fs_device = bdev->bd_dev;

        close_bdev_excl(bdev);
#else
        bdev = open_bdev_exclusive(dev_name, flags, ifs->b_fst);
        if (IS_ERR(bdev)) {
            ivd_dbg(DBG_MAIN, "%s: open_bdev_exclusive returned %ld", dev_name, PTR_ERR(bdev));
            return PTR_ERR(bdev);
        }
        fs_device = bdev->bd_dev;

        close_bdev_exclusive(bdev, flags);
#endif
    }

    {
        char b[BDEVNAME_SIZE];
        ivd_dbg(DBG_MAIN, "%s: device major, minor: %s:", dev_name, __bdevname(fs_device, b));
    }

    /* allocate pseudo device for communication with user space (starts HSM)*/
    ic = ivd_get_comm(fs_device);
    if (ic == NULL) {
        goto err;
    }

    if (ifs->flags & IVD_BFS_NEEDS_USER_XATTR) {
        opt_len += strlen("user_xattr");
        opt_len++; /* this one is either for the comma or for /0 */
    }
    ivd_dbg(DBG_MAIN, "optlen=%d.", opt_len);

    if (opt_len > 0) {
        options = kmalloc(opt_len, GFP_KERNEL);

        if (options == NULL) {
            ivd_err("Cannot allocate memory (size=%d)", opt_len);
            goto err;
        }

        if (ifs->flags & IVD_BFS_NEEDS_USER_XATTR) {

            ivd_dbg(DBG_MAIN, "Adding user_xattr option to %s.", (char *)data);

            if (data != NULL) {
                strcpy(options, data);
                strcat(options, ",");
                strcat(options, "user_xattr");
            }
            else {
                strcpy(options, "user_xattr");
            }
        }
        else {
            strcpy(options, data);
        }
    }
    ivd_dbg(DBG_MAIN, "options=%s", (char *)options);

    ivdfs_setopmode(ic, HSM_OPMODE_REGULAR, 0, false);
    /* Will change to IVD_OPMODE_READ_ONLY_NO_RECALL in future.*/

    /* send PreMount event - synchronous (will block until reply or timeout) */
    ret = ivdfs_evt_pre_mount(NULL, fs_device, ic->minor, dev_name);
    if (ret != 0) {
        char b[BDEVNAME_SIZE];
        if (ret == -ERESTARTSYS) {
            ivd_alert("%s: ivd-hsm did not respond in %ds for mount request.",
                      __bdevname(fs_device, b), hsmfs_timeout);
        }
        else {
            ivd_alert("%s: cannot mount - denied by ivd-fsevtmgr (code: %d)",
                      __bdevname(fs_device, b), ret);
        }
        goto err;
    }

    /* call original super block (do mount) */
    retVal = ifs->b_fst->get_sb(ifs->b_fst, flags, dev_name, options, mnt);
    if (unlikely(retVal != 0)) {
        ivd_alert("Cannot mount bottom FS type: %s, Error: %d.", base_fs_name, retVal);
        goto err;
    }

    if (options != NULL) {
        kfree(options);
        options = NULL;
    }

    ic->fs = ifs;
    ic->sb = mnt->mnt_sb;

    ivd_dbg(DBG_MAIN,
        "%s, %s: successfully mounted bottom FS (type: %s).",
        dev_name, ic->sb->s_id, base_fs_name);

    ivd_dbg(DBG_MAIN, "%s: FS type OK, comm minor=%u", ic->sb->s_id, ic->minor);

    /* override super operations */
    ivdfs_set_super_ops(ic->fs, ic->sb);

    /* override operations for FS root inode */
    if (ivdfs_set_inode_ops(ic, ic->sb->s_root->d_inode) != 0)
        goto err_unmount;

    // TODO: should we initialize hsm attr and inode info?
    // ivdfs_read_inode_info(ic->sb->s_root->d_inode);

    /* successfully mounted - send Mount event */
    (void) ivdfs_evt_mount(ic, fs_device, dev_name, 0); /* TODO: what if error? */

    ivd_info("%s: Sucessfully mounted hsmfs (bottom FS type=%s)", ic->sb->s_id, base_fs_name);

    return retVal;

err_unmount:
    // if bottom FS was mounted - umount
    if (ic->sb != NULL) {
        ivd_err("%s: Unmounting bottom FS type=%s.", ic->sb->s_id, base_fs_name);
        if (ic->sb->s_op->put_super) {
            ic->sb->s_op->put_super(ic->sb);
        }
    }

err:
    if (ic != NULL) {
        if (ic->sb != NULL) {
            /* mount failed - send Mount event with error */
            ivd_dbg(DBG_MAIN, "%s: mount failed - sending mount event with error.", dev_name);
            (void) ivdfs_evt_mount(ic, fs_device, dev_name, EIO);
        }

        if (ic->fs) {
           ivd_put_fs(ic->fs);
        }

        ivd_put_comm(ic);
    }

    if (options != NULL)
        kfree(options);

    return -ENODEV;
}

Here is the call graph for this function:

static int __init ivdfs_init ( void   )  [static]

Definition at line 383 of file ivdfs_mod.c.

References hsmfs_chg_data_interval, hsmfs_debug, hsmfs_dev_major, hsmfs_event_alert, hsmfs_import_delay, hsmfs_max_hsm_busy, hsmfs_max_outstanding, hsmfs_max_sleep_time, hsmfs_new_on_open, hsmfs_path_bufsize, hsmfs_sleep_factor, hsmfs_timeout, ivd_alert, ivd_info, ivdfs_comm_init(), ivdfs_NEW_ON_OPEN_ALL_d, ivdfs_NEW_ON_OPEN_FILES_d, ivdfs_NEW_ON_OPEN_NONE_d, ivdfs_slab_init(), and ivdfs_vers.

{
    int ret=0;

    ivd_info(
        "HSM - File System - %u.%u.%u-%u \"%s\"",
        ivdfs_vers.major, ivdfs_vers.minor, ivdfs_vers.smr, ivdfs_vers.build, ivdfs_vers.label);

    if (hsmfs_debug) {
        ivd_info("%s", ivdfs_vers.moduleVersion);
        ivd_info("%s", ivdfs_vers.buildTime);
        ivd_info("%s", ivdfs_vers.buildSystem);
    }

    if (ivdfs_slab_init() != 0) {
        return -1;
    }

    ret = register_filesystem(&hsmfs_fstype);
    if (ret != 0) {
        ivd_alert("[CRITICAL] register_filesystem failed, ret=%d", ret);
        return ret;
    }
    ret = ivdfs_comm_init();
    if (ret != 0) {
        goto fail;
    }

    ivd_info("ivdfs_dev_major=%u, ivdfs_debug=0x%08lX",
             hsmfs_dev_major, hsmfs_debug);

    if(   hsmfs_sleep_factor <= 0
        || hsmfs_sleep_factor >= 32768) {
            ivd_info("hsmfs_sleep_factor=%d and must be 0 < sleep_factor < 32768",
                hsmfs_sleep_factor);
            hsmfs_sleep_factor = ivdfs_SLEEP_FACTOR_d;
    }

    if(   hsmfs_max_sleep_time <= 0
        || hsmfs_max_sleep_time > 30) {
            ivd_info("hsmfs_max_sleep_time=%d and must be 0 < hsmfs_max_sleep_time <= 30 (in seconds)",
                hsmfs_max_sleep_time);
            hsmfs_max_sleep_time = ivdfs_MAX_SLEEP_TIME_d;
    }

    if(   hsmfs_max_hsm_busy <= 0
       || hsmfs_max_hsm_busy > 36000) {
        ivd_info("hsmfs_max_hsm_busy=%d and must be 0 < max_hsm_busy <= 36000", // 10 hours
                hsmfs_max_hsm_busy);
        hsmfs_max_hsm_busy = ivdfs_MAX_HSM_BUSY_d;
    }

    if(   hsmfs_import_delay < 1  || hsmfs_import_delay > 5) {
        ivd_info("hsmfs_import_delay=%d and must be 0 < hsmfs_import_delay <= 5",
                hsmfs_import_delay);
        hsmfs_import_delay = ivdfs_IMPORT_DELAY_d;
    }

    if ( (hsmfs_new_on_open != ivdfs_NEW_ON_OPEN_NONE_d)
      && (hsmfs_new_on_open != ivdfs_NEW_ON_OPEN_FILES_d)
      && (hsmfs_new_on_open != ivdfs_NEW_ON_OPEN_ALL_d) ) {
        ivd_info("hsmfs_new_on_open=%d and must be 0, 1 or 2", hsmfs_new_on_open);
        hsmfs_new_on_open = ivdfs_NEW_ON_OPEN_FILES_d;
    }

    if (hsmfs_chg_data_interval > 600) {
        ivd_info("hsmfs_chg_data_interval=%u has to be smaller than 600",
                hsmfs_chg_data_interval);
        hsmfs_chg_data_interval = ivdfs_CHG_DATA_INTERVAL_d;
    }

    if (hsmfs_event_alert < 10) {
        ivd_info("hsmfs_event_alert=%u has to be larger than 10",
                hsmfs_event_alert);
        hsmfs_event_alert = ivdfs_EVENT_ALERT_d;
    }

    if (hsmfs_path_bufsize < PAGE_SIZE || hsmfs_path_bufsize > 16*PAGE_SIZE) {
        ivd_info("hsmfs_path_bufize=%u has to be between %lu and %lu",
                hsmfs_path_bufsize, PAGE_SIZE, 16*PAGE_SIZE);
        hsmfs_path_bufsize = ivdfs_PATH_BUFSIZE_d;
    }

    ivd_info("hsmfs_max_outstanding=%d, hsmfs_sleep_factor=%d, hsmfs_max_hsm_busy=%d, hsmfs_timeout=%u",
             hsmfs_max_outstanding, hsmfs_sleep_factor, hsmfs_max_hsm_busy, hsmfs_timeout);

    ivd_info("hsmfs_import_delay=%d, hsmfs_chg_data_interval=%u, hsmfs_event_alert=%u",
             hsmfs_import_delay, hsmfs_chg_data_interval, hsmfs_event_alert);
    ivd_info("hsmfs_path_bufsize=%u",
             hsmfs_path_bufsize);

    // transform hsmfs_max_sleep_time from seconds to jiffies
    hsmfs_max_sleep_time *= HZ;

    return 0;

fail:
    unregister_filesystem(&hsmfs_fstype);
    return ret;
}

Here is the call graph for this function:

void ivdfs_init_inode_info ( struct inode *  inode,
int  flags 
)

We mangle access mode in order to be able to set EA even if file is read/only. This happens for newly created files with readonly mode (see man 2 open). User app gets a read/write handle to such a file and thus triggers ivdfs_mark_dirty() calls.

static void ivdfs_inode_init ( void *  foo  )  [static]

This is contructor function, which is called for each allocated element in the hsm_ii_cache_p by the slab allocator.

Warning:
This function is called only on first allocation of the slab member and not on subsequent allocations. The allocated memory from slab has to be initialised after using kmem_cache_alloc.

Definition at line 81 of file ivdfs_super.c.

References ivd_inode_info_t::cookie, and hsmfs_cookie.

{
    ivd_inode_info_t * ii = (ivd_inode_info_t *)foo;

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
    if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == SLAB_CTOR_CONSTRUCTOR)
#endif
    {
        memset(ii, 0, sizeof(ivd_inode_info_t));
        memcpy(ii->cookie, hsmfs_cookie, sizeof(ii->cookie));
    }
}

void ivdfs_invalidatepage ( struct page *  page,
unsigned long  offset 
)

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

int ivdfs_is_worm_protected ( struct inode *  inode  ) 
void ivdfs_kill_sb ( struct super_block *  sb  ) 

Definition at line 342 of file ivdfs_mod.c.

References DBG_VFS, ivd_dbg, ivd_err, ivd_find_comm(), ivd_info, ivd_put_comm(), and ivd_put_fs().

{
    ivd_dbg(DBG_VFS, "KILL SB CALLED: dev=%s", sb->s_id);
    /*
    It seems that the bottom fs kill_sb overrides the hsmfs kill_sb after the
    get_sb function of the bottom fs is called, because the VFS doesn't call
    this function at all.
    */
//#warning "Find out if is this function called at all. Does it need to be implemented at all?"
#if 0
    ivd_dbg(DBG_VFS, "dev=%s", sb->s_id);

    if (!(ic = ivd_find_comm(sb->s_dev))) {
        ivd_err("Cannot find comm for device %u: can't kill super block.", sb->s_dev);
        return;
    }

    down_write(&ic->sem);

    if (ic->fs->b_fst->kill_sb)
        ic->fs->b_fst->kill_sb(sb);

    ivd_info("%s: killed super block.", sb->s_id);

    ivd_put_fs(ic->fs);
    ivd_put_comm(ic);

    up_write(&ic->sem);
#endif
}

Here is the call graph for this function:

int ivdfs_link ( struct dentry *  old_de,
struct inode *  dir,
struct dentry *  de 
)

Referenced by ivdfs_set_d_inode_ops().

Here is the caller graph for this function:

int ivdfs_lock_file ( ivd_comm_t ic,
unsigned int  cmd,
UInt64_t  id_fs,
UInt64_t  file_id,
UInt32_t  op,
UInt32_t chg_time,
UInt64_t chunk_size,
UInt32_t flags 
)

Referenced by ivdfs_dev_ioctl().

Here is the caller graph for this function:

struct dentry * ivdfs_lookup ( struct inode *  dir,
struct dentry *  dentry,
struct nameidata *  nd 
) [read]

Referenced by ivdfs_set_d_inode_ops().

Here is the caller graph for this function:

void ivdfs_mark_clean ( struct inode *  inode,
loff_t  off,
loff_t  pos,
int  flags 
)
int ivdfs_mark_dirty ( struct inode *  inode,
loff_t  off,
loff_t  pos,
int  flags 
)
int ivdfs_mark_offline ( struct inode *  inode,
loff_t  off,
loff_t  pos,
int  flags 
)
void ivdfs_mark_online ( struct inode *  inode,
loff_t  off,
loff_t  pos,
int  flags 
)
int ivdfs_mkdir ( struct inode *  dir,
struct dentry *  de,
int  mode 
)

Referenced by ivdfs_set_d_inode_ops().

Here is the caller graph for this function:

int ivdfs_mknod ( struct inode *  dir,
struct dentry *  dentry,
int  mode,
dev_t  rdev 
)

Referenced by ivdfs_set_d_inode_ops().

Here is the caller graph for this function:

static int ivdfs_parse_options ( char *  options,
char *  fs 
) [static]

Definition at line 111 of file ivdfs_mod.c.

References FSTYPE_SLEN, and min.

Referenced by ivdfs_get_sb().

{
    char    *cc, *icc, *val;
    int     val_len;

    if (!options)
        return 1;

    cc = options;
    while (*cc != 0) {
        if (strncmp(cc, "hsmfstype=", 10) == 0) {
            icc=cc;
            cc += 10;
            val = cc;
            while (*cc != 0 && *cc != ',')
                cc++;
            val_len = cc - val;
            strncpy(fs, val, min(val_len, FSTYPE_SLEN));
            fs[min(val_len, FSTYPE_SLEN)] = 0;
            if (*cc == ',')
                cc++;

            /* remove ivd specific options */
            memmove(icc, cc, strlen(cc)+1);
            cc=icc;
        }
        else { /* not ivd option - skip */
            while (*cc != 0 && *cc != ',')
                cc++;
            if (*cc == ',')
                cc++;
        }
    }

    return 1;
}

Here is the caller graph for this function:

int ivdfs_permission ( struct inode *  inode,
int  mask 
)
void ivdfs_put_link ( struct dentry *  dentry,
struct nameidata *  nd,
void *  p 
)
void ivdfs_put_super ( struct super_block *  sb  ) 
void ivdfs_read_inode_info ( struct inode *  inode,
int  flags 
)
int ivdfs_readlink ( struct dentry *  de,
char __user *  buf,
int  buflen 
)
int ivdfs_readpage ( struct file filp,
struct page *  page 
)

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

int ivdfs_readpages ( struct file filp,
struct address_space *  mapping,
struct list_head *  pages,
unsigned  nr_pages 
)

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

int ivdfs_releasepage ( struct page *  page,
gfp_t  gfp 
)

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

int ivdfs_remount_fs ( struct super_block *  sb,
int *  flags,
char *  data 
)
int ivdfs_rename ( struct inode *  old_dir,
struct dentry *  old_de,
struct inode *  new_dir,
struct dentry *  new_de 
)

Referenced by ivdfs_set_d_inode_ops().

Here is the caller graph for this function:

int ivdfs_rmdir ( struct inode *  dir,
struct dentry *  de 
)

Referenced by ivdfs_set_d_inode_ops().

Here is the caller graph for this function:

void ivdfs_set_close_time ( struct inode *  inode,
struct timespec  time 
)
static void ivdfs_set_d_file_ops ( ivd_fs_t fs,
struct inode *  inode 
) [static]

Definition at line 375 of file ivdfs_filter.c.

References ivd_fs_t::b_op, ivd_fs_b_ops_t::d_file, ivd_fs_ops_t::d_file, ivd_err, ivdfs_file_ioctl(), ivd_fs_t::name, NULL, ivd_fs_t::op, and OVERRIDE.

{
    struct file_operations *ivd_ops = &fs->op->d_file;

    if (fs->b_op->d_file == inode->i_fop) {    // already overriden
        inode->i_fop = ivd_ops;
        return;
    }
    else if (ivd_ops == inode->i_fop) {
        // already hijacked
        return;
    }
    else if (fs->b_op->d_file != NULL) {   // overridden, but does not match
        ivd_err("bottom ops mismatch for %s: now=%p, before=%p, ino=%lu (%u)",
                fs->name, inode->i_fop, fs->b_op->d_file,
                inode->i_ino, inode->i_generation);
        return;
    }

    // OK, override for the first time
    memcpy(ivd_ops, inode->i_fop, sizeof(*ivd_ops));// copy from bottom
    fs->b_op->d_file = inode->i_fop;                // save pointer to bottom
    inode->i_fop = ivd_ops;                         // switch to ivd ops

    OVERRIDE(ivd_ops, ioctl,        ivdfs_file_ioctl);
}

Here is the call graph for this function:

static void ivdfs_set_d_inode_ops ( ivd_fs_t fs,
struct inode *  inode 
) [static]

Definition at line 231 of file ivdfs_filter.c.

References ivd_fs_t::b_op, ivd_fs_b_ops_t::d_inode, ivd_fs_ops_t::d_inode, DBG_VFS_ALL, hsmfs_debug, ivd_err, ivdfs_create(), ivdfs_link(), ivdfs_lookup(), ivdfs_mkdir(), ivdfs_mknod(), ivdfs_rename(), ivdfs_rmdir(), ivdfs_setattr(), ivdfs_symlink(), ivdfs_unlink(), ivd_fs_t::name, NULL, ivd_fs_t::op, and OVERRIDE.

{
    struct inode_operations *ivd_ops = &fs->op->d_inode;

    if (fs->b_op->d_inode == inode->i_op) {     // already overriden
        inode->i_op = ivd_ops;
        return;
    }
    else if (ivd_ops == inode->i_op) {
        // already hijacked
        return;
    }
    else if (fs->b_op->d_inode != NULL) {   // overridden, but does not match
        ivd_err("bottom ops mismatch for %s: now=%p, before=%p, ino=%lu (%u)",
                fs->name, inode->i_op, fs->b_op->d_inode,
                inode->i_ino, inode->i_generation);
        return;
    }

    // OK, override for the first time
    memcpy(ivd_ops, inode->i_op, sizeof(*ivd_ops)); // copy from bottom
    fs->b_op->d_inode = inode->i_op;                // save pointer to bottom
    inode->i_op = ivd_ops;                          // switch to ivd ops

    OVERRIDE(ivd_ops, lookup,       ivdfs_lookup);
    OVERRIDE(ivd_ops, create,       ivdfs_create);
    OVERRIDE(ivd_ops, link,         ivdfs_link);
    OVERRIDE(ivd_ops, unlink,       ivdfs_unlink);
    OVERRIDE(ivd_ops, symlink,      ivdfs_symlink);
    OVERRIDE(ivd_ops, mkdir,        ivdfs_mkdir);
    OVERRIDE(ivd_ops, rmdir,        ivdfs_rmdir);
    OVERRIDE(ivd_ops, mknod,        ivdfs_mknod);
    OVERRIDE(ivd_ops, rename,       ivdfs_rename);
    OVERRIDE(ivd_ops, setattr,      ivdfs_setattr);

#if IVD_XATTR
    OVERRIDE(ivd_ops, setxattr,     ivdfs_setxattr);
    OVERRIDE(ivd_ops, getxattr,     ivdfs_getxattr);
    OVERRIDE(ivd_ops, listxattr,    ivdfs_listxattr);
    OVERRIDE(ivd_ops, removexattr,  ivdfs_removexattr);
#else
#   error "Kernel does not support extended attributes"
#endif

#if IVD_OVERRIDE_ALL
    if (hsmfs_debug & DBG_VFS_ALL) {
//#warning causes oops on newer 2.6 kernels (kubuntu)
//        OVERRIDE(ivd_ops, permission,      ivdfs_permission);
    }
#endif

}

Here is the call graph for this function:

static void ivdfs_set_f_addrs_ops ( ivd_fs_t fs,
struct inode *  inode 
) [static]

Definition at line 461 of file ivdfs_filter.c.

References ivd_fs_t::b_op, DBG_VFS_ALL, ivd_fs_b_ops_t::f_addrs, ivd_fs_ops_t::f_addrs, hsmfs_debug, ivd_err, ivdfs_bmap(), ivdfs_direct_IO(), ivdfs_invalidatepage(), ivdfs_readpage(), ivdfs_readpages(), ivdfs_releasepage(), ivdfs_set_page_dirty(), ivdfs_sync_page(), ivdfs_write_begin(), ivdfs_write_end(), ivdfs_writepage(), ivdfs_writepages(), ivd_fs_t::name, NULL, ivd_fs_t::op, and OVERRIDE.

{
    struct address_space_operations *ivd_ops = &fs->op->f_addrs;

    if (fs->b_op->f_addrs == inode->i_mapping->a_ops) {   // already overriden
        inode->i_mapping->a_ops = ivd_ops;
        return;
    }
    else if (ivd_ops == inode->i_mapping->a_ops) {
        // already hijacked
        return;
    }
    else if (fs->b_op->f_addrs != NULL) {   // overridden, but does not match
        ivd_err("bottom ops mismatch for %s: now=%p, before=%p, ino=%lu (%u)",
                fs->name, inode->i_mapping->a_ops, fs->b_op->f_addrs,
                inode->i_ino, inode->i_generation);
        return;
    }

    // OK, override for the first time
    memcpy(ivd_ops, inode->i_mapping->a_ops, sizeof(*ivd_ops));
    fs->b_op->f_addrs = inode->i_mapping->a_ops;    // save pointer to bottom
    inode->i_mapping->a_ops = ivd_ops;              // switch to ivd ops

    OVERRIDE(ivd_ops, readpage,        ivdfs_readpage);
    OVERRIDE(ivd_ops, readpages,       ivdfs_readpages);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
    OVERRIDE(ivd_ops, prepare_write,   ivdfs_prepare_write);
    OVERRIDE(ivd_ops, commit_write,    ivdfs_commit_write);
#else
    OVERRIDE(ivd_ops, write_begin,     ivdfs_write_begin);
    OVERRIDE(ivd_ops, write_end,       ivdfs_write_end);
#endif

#if IVD_OVERRIDE_ALL
    if (hsmfs_debug & DBG_VFS_ALL) {
        OVERRIDE(ivd_ops, writepage,        ivdfs_writepage);
        OVERRIDE(ivd_ops, writepages,       ivdfs_writepages);
        OVERRIDE(ivd_ops, set_page_dirty,   ivdfs_set_page_dirty);
        OVERRIDE(ivd_ops, invalidatepage,   ivdfs_invalidatepage);
        OVERRIDE(ivd_ops, sync_page,        ivdfs_sync_page);
        OVERRIDE(ivd_ops, releasepage,      ivdfs_releasepage);
        OVERRIDE(ivd_ops, bmap,             ivdfs_bmap);
        OVERRIDE(ivd_ops, direct_IO,        ivdfs_direct_IO);
    }
#endif
}

Here is the call graph for this function:

static void ivdfs_set_f_file_ops ( ivd_fs_t fs,
struct inode *  inode 
) [static]

Definition at line 403 of file ivdfs_filter.c.

References ivd_fs_t::b_op, DBG_VFS_ALL, ivd_fs_b_ops_t::f_file, ivd_fs_ops_t::f_file, hsmfs_debug, ivd_err, ivdfs_file_aio_fsync(), ivdfs_file_aio_read(), ivdfs_file_aio_write(), ivdfs_file_fasync(), ivdfs_file_flock(), ivdfs_file_flush(), ivdfs_file_fsync(), ivdfs_file_get_unmapped_area(), ivdfs_file_ioctl(), ivdfs_file_lock(), ivdfs_file_mmap(), ivdfs_file_open(), ivdfs_file_read(), ivdfs_file_release(), ivdfs_file_sendpage(), ivdfs_file_write(), ivd_fs_t::name, NULL, ivd_fs_t::op, and OVERRIDE.

{
    struct file_operations *ivd_ops = &fs->op->f_file;

    if (fs->b_op->f_file == inode->i_fop) {     // already overriden
        inode->i_fop = ivd_ops;
        return;
    }
    else if (ivd_ops == inode->i_fop) {
        // already hijacked
        return;
    }
    else if (fs->b_op->f_file != NULL) {   // overridden, but does not match
        ivd_err("bottom ops mismatch for %s: now=%p, before=%p, ino=%lu (%u)",
                fs->name, inode->i_fop, fs->b_op->f_file,
                inode->i_ino, inode->i_generation);
        return;
    }

    // OK, override for the first time
    memcpy(ivd_ops, inode->i_fop, sizeof(*ivd_ops));// copy from bottom
    fs->b_op->f_file = inode->i_fop;                // save pointer to bottom
    inode->i_fop = ivd_ops;                         // switch to ivd ops

    OVERRIDE(ivd_ops, ioctl,        ivdfs_file_ioctl);
    OVERRIDE(ivd_ops, open,         ivdfs_file_open);
    OVERRIDE(ivd_ops, release,      ivdfs_file_release);
    OVERRIDE(ivd_ops, write,        ivdfs_file_write);
    OVERRIDE(ivd_ops, read,         ivdfs_file_read);
    OVERRIDE(ivd_ops, aio_write,    ivdfs_file_aio_write);
    OVERRIDE(ivd_ops, aio_read,     ivdfs_file_aio_read);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
    OVERRIDE(ivd_ops, writev,       ivdfs_file_writev);
    OVERRIDE(ivd_ops, readv,        ivdfs_file_readv);
#endif
    OVERRIDE(ivd_ops, mmap,         ivdfs_file_mmap);

#if IVD_OVERRIDE_ALL
    if (hsmfs_debug & DBG_VFS_ALL) {
        OVERRIDE(ivd_ops, fsync,             ivdfs_file_fsync);
        OVERRIDE(ivd_ops, fasync,            ivdfs_file_fasync);
        OVERRIDE(ivd_ops, aio_fsync,         ivdfs_file_aio_fsync);
        OVERRIDE(ivd_ops, flush,             ivdfs_file_flush);
        OVERRIDE(ivd_ops, lock,              ivdfs_file_lock);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
        OVERRIDE(ivd_ops, sendfile,          ivdfs_file_sendfile);
#endif
        OVERRIDE(ivd_ops, sendpage,          ivdfs_file_sendpage);
        OVERRIDE(ivd_ops, get_unmapped_area, ivdfs_file_get_unmapped_area);
        OVERRIDE(ivd_ops, flock,             ivdfs_file_flock);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
        OVERRIDE(ivd_ops, dir_notify,        ivdfs_file_dir_notify);
#endif
    }
#endif
}

Here is the call graph for this function:

static void ivdfs_set_f_inode_ops ( ivd_fs_t fs,
struct inode *  inode 
) [static]

Definition at line 284 of file ivdfs_filter.c.

References ivd_fs_t::b_op, DBG_VFS_ALL, ivd_fs_b_ops_t::f_inode, ivd_fs_ops_t::f_inode, hsmfs_debug, ivd_err, ivdfs_setattr(), ivdfs_truncate(), ivd_fs_t::name, NULL, ivd_fs_t::op, and OVERRIDE.

{
    struct inode_operations *ivd_ops = &fs->op->f_inode;

    if (fs->b_op->f_inode == inode->i_op) {     // already overriden
        inode->i_op = ivd_ops;
        return;
    }
    else if (ivd_ops == inode->i_op) {
        // already hijacked
        return;
    }
    else if (fs->b_op->f_inode != NULL) {   // overridden, but does not match
        ivd_err("bottom ops mismatch for %s: now=%p, before=%p, ino=%lu (%u)",
                fs->name, inode->i_op, fs->b_op->f_inode,
                inode->i_ino, inode->i_generation);
        return;
    }

    // OK, override for the first time
    memcpy(ivd_ops, inode->i_op, sizeof(*ivd_ops)); // copy from bottom
    fs->b_op->f_inode = inode->i_op;                // save pointer to bottom
    inode->i_op = ivd_ops;                          // switch to ivd ops

    OVERRIDE(ivd_ops, truncate,     ivdfs_truncate);
    OVERRIDE(ivd_ops, setattr,      ivdfs_setattr);

#if IVD_XATTR
    OVERRIDE(ivd_ops, setxattr,     ivdfs_setxattr);
    OVERRIDE(ivd_ops, getxattr,     ivdfs_getxattr);
    OVERRIDE(ivd_ops, listxattr,    ivdfs_listxattr);
    OVERRIDE(ivd_ops, removexattr,  ivdfs_removexattr);
#else
#   error "Kernel does not support extended attributes"
#endif

#if IVD_OVERRIDE_ALL
    if (hsmfs_debug & DBG_VFS_ALL) {
//#warning causes oops on newer 2.6 kernels (kubuntu)
//        OVERRIDE(ivd_ops, permission,      ivdfs_permission);
    }
#endif

}

Here is the call graph for this function:

int ivdfs_set_fileid ( ivd_comm_t ic,
UInt64_t  id_fs,
UInt64_t  file_id,
UInt64_t  chunk_size 
)

Referenced by ivdfs_dev_ioctl().

Here is the caller graph for this function:

int ivdfs_set_inode_ops ( ivd_comm_t ic,
struct inode *  inode 
)

Referenced by ivdfs_get_sb().

Here is the caller graph for this function:

int ivdfs_set_page_dirty ( struct page *  page  ) 

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

void ivdfs_set_super_ops ( ivd_fs_t fs,
struct super_block *  sb 
)

Referenced by ivdfs_get_sb().

Here is the caller graph for this function:

int ivdfs_setattr ( struct dentry *  de,
struct iattr *  attr 
)

Referenced by ivdfs_set_d_inode_ops(), and ivdfs_set_f_inode_ops().

Here is the caller graph for this function:

int ivdfs_setopmode ( ivd_comm_t ic,
UInt16_t  opmode,
UInt16_t  timeout,
bool  recallOnOpen 
)

Referenced by ivdfs_dev_ioctl(), and ivdfs_get_sb().

Here is the caller graph for this function:

void ivdfs_slab_destroy (  ) 

Referenced by ivdfs_exit().

Here is the caller graph for this function:

int ivdfs_slab_init (  ) 

Referenced by ivdfs_init().

Here is the caller graph for this function:

int ivdfs_statfs ( struct dentry *  de,
struct kstatfs *  buf 
)
int ivdfs_symlink ( struct inode *  dir,
struct dentry *  de,
const char *  symname 
)

Referenced by ivdfs_set_d_inode_ops().

Here is the caller graph for this function:

void ivdfs_sync_fs ( struct super_block *  sb,
int  wait 
)
void ivdfs_sync_page ( struct page *  page  ) 

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

int ivdfs_trigger_event ( ivd_comm_t ic,
unsigned int  evt,
UInt64_t  id_fs,
UInt64_t  chunk_size,
UInt64_t  chunk_offset 
)

Referenced by ivdfs_dev_ioctl().

Here is the caller graph for this function:

void ivdfs_truncate ( struct inode *  inode  ) 

Referenced by ivdfs_set_f_inode_ops().

Here is the caller graph for this function:

void ivdfs_umount_begin ( struct super_block *  sb  ) 
int ivdfs_unfreeze_fs ( struct super_block *  sb  ) 
int ivdfs_unlink ( struct inode *  dir,
struct dentry *  de 
)

Referenced by ivdfs_set_d_inode_ops().

Here is the caller graph for this function:

int ivdfs_write_begin ( struct file filp,
struct address_space *  mapping,
loff_t  pos,
unsigned  len,
unsigned  flags,
struct page **  pagep,
void **  fsdata 
)

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

int ivdfs_write_end ( struct file filp,
struct address_space *  mapping,
loff_t  pos,
unsigned  len,
unsigned  copied,
struct page *  page,
void *  fsdata 
)

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

int ivdfs_write_inode ( struct inode *  inode,
struct writeback_control *  wbc 
)
void ivdfs_write_inode_info ( struct inode *  inode,
int  flags 
)
void ivdfs_write_super ( struct super_block *  sb  ) 
int ivdfs_writepage ( struct page *  page,
struct writeback_control *  wbc 
)

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

int ivdfs_writepages ( struct address_space *  mapping,
struct writeback_control *  wbc 
)

Referenced by ivdfs_set_f_addrs_ops().

Here is the caller graph for this function:

MODULE_AUTHOR ( ivd_COMPANY_NAME_d   ) 
MODULE_DESCRIPTION ( ivd_MODULE_DESC_d" - Version: "TO_STR(ivd_VERSION_MAJOR_d)"."TO_STR(ivd_VERSION_MINOR_d)"."TO_STR(ivd_VERSION_SYS_MAINT_REL_d)"-"TO_STR(ivd_VERSION_BUILDNUM_d)" "  ivd_VERSION_LABEL_d  ) 
module_exit ( ivdfs_exit   ) 
module_init ( ivdfs_init   ) 
MODULE_LICENSE ( "GPL"   ) 
module_param ( hsmfs_new_on_open  ,
int  ,
S_IRUGO   
)
module_param ( hsmfs_max_sleep_time  ,
int  ,
S_IRUGO|  S_IWUSR 
)
module_param ( hsmfs_event_alert  ,
uint  ,
S_IRUGO   
)
module_param ( hsmfs_max_hsm_busy  ,
int  ,
S_IRUGO   
)
module_param ( hsmfs_path_bufsize  ,
uint  ,
S_IRUGO   
)
module_param ( hsmfs_max_outstanding  ,
int  ,
S_IRUGO|  S_IWUSR 
)
module_param ( hsmfs_chg_data_interval  ,
uint  ,
S_IRUGO   
)
module_param ( hsmfs_timeout  ,
ushort  ,
S_IRUGO   
)
module_param ( hsmfs_debug  ,
ulong  ,
S_IRUGO|  S_IWUSR 
)
module_param ( hsmfs_dev_major  ,
ushort  ,
S_IRUGO   
)
module_param ( hsmfs_import_delay  ,
int  ,
S_IRUGO   
)
module_param ( hsmfs_sleep_factor  ,
int  ,
S_IRUGO|  S_IWUSR 
)
MODULE_PARM_DESC ( hsmfs_import_delay  ,
"delay in hundredth of seconds on first lookup of a file that was created in ext3 when hsmfs was not active"   
)
MODULE_PARM_DESC ( hsmfs_path_bufsize  ,
"hsmfs buffer size for pathnames"   
)
MODULE_PARM_DESC ( hsmfs_max_outstanding  ,
"max # of outstanding requests per FS (length of the queue)"   
)
MODULE_PARM_DESC ( hsmfs_max_hsm_busy  ,
"seconds of HSM inactivity before hsmfs starts writing warnings"   
)
MODULE_PARM_DESC ( hsmfs_chg_data_interval  ,
"hsmfs change data event interval"   
)
MODULE_PARM_DESC ( hsmfs_new_on_open  ,
"new-on-open mode"   
)
MODULE_PARM_DESC ( hsmfs_sleep_factor   ) 
MODULE_PARM_DESC ( hsmfs_timeout  ,
"hsmfs comm timeout for synchronous requests (seconds)"   
)
MODULE_PARM_DESC ( hsmfs_event_alert  ,
"report event queue counters when # of events in queue passes multiple of this threshold"   
)
MODULE_PARM_DESC ( hsmfs_debug  ,
"Debugging flags"   
)
MODULE_PARM_DESC ( hsmfs_dev_major  ,
"hsmfs comm device major number (0 = autoselect)"   
)
MODULE_PARM_DESC ( hsmfs_max_sleep_time  ,
"max sleep time in seconds"   
)
MODULE_VERSION ( TO_STR(ivd_VERSION_MAJOR_d)"."TO_STR(ivd_VERSION_MINOR_d)"."TO_STR(ivd_VERSION_SYS_MAINT_REL_d)"-"TO_STR(ivd_VERSION_BUILDNUM_d)" "   ) 

Variable Documentation

UInt32_t { ... } build [inherited]

Definition at line 88 of file ivdfs_mod.c.

const { ... } buildSystem [inherited]

Definition at line 92 of file ivdfs_mod.c.

const { ... } buildTime [inherited]

Definition at line 91 of file ivdfs_mod.c.

spinlock_t comm_lock = SPIN_LOCK_UNLOCKED [static]

Definition at line 66 of file ivdfs_comm.c.

struct kmem_cache* hsm_ii_cache_p [static]

Definition at line 69 of file ivdfs_super.c.

Referenced by free_hsmfs_inode_info().

Definition at line 129 of file ivdfs_params.c.

Referenced by ivdfs_init().

unsigned int hsmfs_chg_data_interval = ivdfs_CHG_DATA_INTERVAL_d

Definition at line 129 of file ivdfs_params.c.

Referenced by ivdfs_init().

const char* const hsmfs_cookie = "hsmAMLK\0"

hsmfs magic cookie for inode info.

Definition at line 59 of file ivdfs_params.c.

Referenced by ivdfs_bad_cookie(), and ivdfs_inode_init().

const char* const hsmfs_cookie

hsmfs magic cookie for inode info.

Definition at line 59 of file ivdfs_params.c.

Referenced by ivdfs_bad_cookie(), and ivdfs_inode_init().

unsigned long hsmfs_debug

Module parameters - can be set at insmod time.

Definition at line 63 of file ivdfs_params.c.

Referenced by ivdfs_dev_ioctl(), ivdfs_init(), ivdfs_set_d_inode_ops(), ivdfs_set_f_addrs_ops(), ivdfs_set_f_file_ops(), and ivdfs_set_f_inode_ops().

unsigned long hsmfs_debug = 0

Module parameters - can be set at insmod time.

Definition at line 63 of file ivdfs_params.c.

Referenced by ivdfs_dev_ioctl(), ivdfs_init(), ivdfs_set_d_inode_ops(), ivdfs_set_f_addrs_ops(), ivdfs_set_f_file_ops(), and ivdfs_set_f_inode_ops().

unsigned short hsmfs_dev_major = 0

Definition at line 69 of file ivdfs_params.c.

Referenced by ivdfs_dev_open(), ivdfs_dev_release(), and ivdfs_init().

unsigned short hsmfs_dev_major

Definition at line 69 of file ivdfs_params.c.

Referenced by ivdfs_dev_open(), ivdfs_dev_release(), and ivdfs_init().

unsigned int hsmfs_event_alert

Definition at line 117 of file ivdfs_params.c.

Referenced by ivdfs_init().

unsigned int hsmfs_event_alert = ivdfs_EVENT_ALERT_d

Definition at line 117 of file ivdfs_params.c.

Referenced by ivdfs_init().

struct file_system_type hsmfs_fstype [static]
Initial value:
 {
    owner:           THIS_MODULE,
    name:            "hsmfs",
    get_sb:          ivdfs_get_sb,
    kill_sb:         ivdfs_kill_sb,
    fs_flags:        FS_REQUIRES_DEV,
}

Definition at line 375 of file ivdfs_mod.c.

Definition at line 105 of file ivdfs_params.c.

Referenced by ivdfs_init().

int hsmfs_import_delay = ivdfs_IMPORT_DELAY_d

Definition at line 105 of file ivdfs_params.c.

Referenced by ivdfs_init().

Definition at line 99 of file ivdfs_params.c.

Referenced by ivdfs_init().

int hsmfs_max_hsm_busy = ivdfs_MAX_HSM_BUSY_d

Definition at line 99 of file ivdfs_params.c.

Referenced by ivdfs_init().

Definition at line 81 of file ivdfs_params.c.

Referenced by ivdfs_init().

Definition at line 81 of file ivdfs_params.c.

Referenced by ivdfs_init().

int hsmfs_max_sleep_time = ivdfs_MAX_SLEEP_TIME_d

Definition at line 93 of file ivdfs_params.c.

Referenced by ivdfs_init().

Definition at line 93 of file ivdfs_params.c.

Referenced by ivdfs_init().

int hsmfs_new_on_open = ivdfs_NEW_ON_OPEN_FILES_d

Definition at line 111 of file ivdfs_params.c.

Referenced by ivdfs_get_path(), and ivdfs_init().

Definition at line 111 of file ivdfs_params.c.

Referenced by ivdfs_get_path(), and ivdfs_init().

unsigned int hsmfs_path_bufsize = ivdfs_PATH_BUFSIZE_d

Definition at line 123 of file ivdfs_params.c.

Referenced by ivdfs_init().

unsigned int hsmfs_path_bufsize

Definition at line 123 of file ivdfs_params.c.

Referenced by ivdfs_init().

Definition at line 87 of file ivdfs_params.c.

Referenced by ivdfs_init().

int hsmfs_sleep_factor = ivdfs_SLEEP_FACTOR_d

Definition at line 87 of file ivdfs_params.c.

Referenced by ivdfs_init().

unsigned short hsmfs_timeout

Definition at line 75 of file ivdfs_params.c.

Referenced by ivdfs_get_sb(), and ivdfs_init().

unsigned short hsmfs_timeout = 5*60

Definition at line 75 of file ivdfs_params.c.

Referenced by ivdfs_get_sb(), and ivdfs_init().

ivd_comm_t ivd_comm[MAX_IVDFS] [static]

Definition at line 69 of file ivdfs_comm.c.

struct timespec ivd_nul_time

Definition at line 61 of file ivdfs_params.c.

Referenced by ivdfs_dev_read().

struct timespec ivd_nul_time = {0, 0}

Definition at line 61 of file ivdfs_params.c.

Referenced by ivdfs_dev_read().

ivd_fs_t ivd_supp_fs[] [static]
Initial value:
{
    { "ext3", 0,  IVD_BFS_NEEDS_USER_XATTR, NULL, NULL, NULL },







    { NULL,   0,  0, NULL, NULL, NULL },
}

Definition at line 68 of file ivdfs_filter.c.

struct file_operations ivdfs_dev_fops
Initial value:
 {
    .owner      = THIS_MODULE,
    .llseek     = no_llseek,
    .read       = ivdfs_dev_read,
    .write      = ivdfs_dev_write,
    .poll       = ivdfs_dev_poll,
    .ioctl      = ivdfs_dev_ioctl,
    .open       = ivdfs_dev_open,
    .release    = ivdfs_dev_release
}

Definition at line 1034 of file ivdfs_comm.c.

struct { ... } ivdfs_vers [static]

Referenced by ivdfs_init().

const { ... } label [inherited]

Definition at line 89 of file ivdfs_mod.c.

UInt32_t { ... } major [inherited]

Definition at line 85 of file ivdfs_mod.c.

UInt32_t { ... } minor [inherited]

Definition at line 86 of file ivdfs_mod.c.

const { ... } moduleVersion [inherited]

Definition at line 90 of file ivdfs_mod.c.

UInt32_t { ... } smr [inherited]

Definition at line 87 of file ivdfs_mod.c.

spinlock_t supp_fs_lock = SPIN_LOCK_UNLOCKED [static]

Definition at line 65 of file ivdfs_filter.c.