patch-2.4.22 linux-2.4.22/include/linux/fs.h
Next file: linux-2.4.22/include/linux/hfs_fs.h
Previous file: linux-2.4.22/include/linux/ethtool.h
Back to the patch index
Back to the overall index
- Lines: 164
- Date:
2003-08-25 04:44:44.000000000 -0700
- Orig file:
linux-2.4.21/include/linux/fs.h
- Orig date:
2003-06-13 07:51:38.000000000 -0700
diff -urN linux-2.4.21/include/linux/fs.h linux-2.4.22/include/linux/fs.h
@@ -201,6 +201,7 @@
#include <asm/byteorder.h>
extern void update_atime (struct inode *);
+extern void update_mctime (struct inode *);
#define UPDATE_ATIME(inode) update_atime (inode)
extern void buffer_init(unsigned long);
@@ -221,6 +222,7 @@
BH_Launder, /* 1 if we can throttle on this buffer */
BH_Attached, /* 1 if b_inode_buffers is linked into a list */
BH_JBD, /* 1 if it has an attached journal_head */
+ BH_Sync, /* 1 if the buffer is a sync read */
BH_PrivateStart,/* not a state bit, but the first bit available
* for private allocation by other entities
@@ -396,6 +398,8 @@
int (*releasepage) (struct page *, int);
#define KERNEL_HAS_O_DIRECT /* this is for modules out of the kernel */
int (*direct_IO)(int, struct inode *, struct kiobuf *, unsigned long, int);
+#define KERNEL_HAS_DIRECT_FILEIO /* Unfortunate kludge due to lack of foresight */
+ int (*direct_fileIO)(int, struct file *, struct kiobuf *, unsigned long, int);
void (*removepage)(struct page *); /* called when page gets removed from the inode */
};
@@ -455,7 +459,9 @@
unsigned long i_blksize;
unsigned long i_blocks;
unsigned long i_version;
+ unsigned short i_bytes;
struct semaphore i_sem;
+ struct rw_semaphore i_alloc_sem;
struct semaphore i_zombie;
struct inode_operations *i_op;
struct file_operations *i_fop; /* former ->i_op->default_file_ops */
@@ -515,6 +521,39 @@
} u;
};
+static inline void inode_add_bytes(struct inode *inode, loff_t bytes)
+{
+ inode->i_blocks += bytes >> 9;
+ bytes &= 511;
+ inode->i_bytes += bytes;
+ if (inode->i_bytes >= 512) {
+ inode->i_blocks++;
+ inode->i_bytes -= 512;
+ }
+}
+
+static inline void inode_sub_bytes(struct inode *inode, loff_t bytes)
+{
+ inode->i_blocks -= bytes >> 9;
+ bytes &= 511;
+ if (inode->i_bytes < bytes) {
+ inode->i_blocks--;
+ inode->i_bytes += 512;
+ }
+ inode->i_bytes -= bytes;
+}
+
+static inline loff_t inode_get_bytes(struct inode *inode)
+{
+ return (((loff_t)inode->i_blocks) << 9) + inode->i_bytes;
+}
+
+static inline void inode_set_bytes(struct inode *inode, loff_t bytes)
+{
+ inode->i_blocks = bytes >> 9;
+ inode->i_bytes = bytes & 511;
+}
+
struct fown_struct {
int pid; /* pid or -pgrp where SIGIO should be sent */
uid_t uid, euid; /* uid/euid of process setting the owner */
@@ -635,6 +674,7 @@
extern time_t lease_get_mtime(struct inode *);
extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
+extern void steal_locks(fl_owner_t from);
struct fasync_struct {
int magic;
@@ -660,20 +700,6 @@
int last_type;
};
-#define DQUOT_USR_ENABLED 0x01 /* User diskquotas enabled */
-#define DQUOT_GRP_ENABLED 0x02 /* Group diskquotas enabled */
-
-struct quota_mount_options
-{
- unsigned int flags; /* Flags for diskquotas on this device */
- struct semaphore dqio_sem; /* lock device while I/O in progress */
- struct semaphore dqoff_sem; /* serialize quota_off() and quota_on() on device */
- struct file *files[MAXQUOTAS]; /* fp's to quotafiles */
- time_t inode_expire[MAXQUOTAS]; /* expiretime for inode-quota */
- time_t block_expire[MAXQUOTAS]; /* expiretime for block-quota */
- char rsquash[MAXQUOTAS]; /* for quotas threat root as any other user */
-};
-
/*
* Umount options
*/
@@ -721,6 +747,7 @@
struct file_system_type *s_type;
struct super_operations *s_op;
struct dquot_operations *dq_op;
+ struct quotactl_ops *s_qcop;
unsigned long s_flags;
unsigned long s_magic;
struct dentry *s_root;
@@ -735,7 +762,7 @@
struct block_device *s_bdev;
struct list_head s_instances;
- struct quota_mount_options s_dquot; /* Diskquota specific options */
+ struct quota_info s_dquot; /* Diskquota specific options */
union {
struct minix_sb_info minix_sb;
@@ -959,16 +986,6 @@
__mark_inode_dirty(inode, I_DIRTY_PAGES);
}
-struct dquot_operations {
- void (*initialize) (struct inode *, short);
- void (*drop) (struct inode *);
- int (*alloc_block) (struct inode *, unsigned long, char);
- int (*alloc_inode) (const struct inode *, unsigned long);
- void (*free_block) (struct inode *, unsigned long);
- void (*free_inode) (const struct inode *, unsigned long);
- int (*transfer) (struct inode *, struct iattr *);
-};
-
struct file_system_type {
const char *name;
int fs_flags;
@@ -1268,6 +1285,7 @@
return fsync_buffers_list(&inode->i_dirty_data_buffers);
}
extern int inode_has_buffers(struct inode *);
+extern int do_fdatasync(struct file *);
extern int filemap_fdatasync(struct address_space *);
extern int filemap_fdatawait(struct address_space *);
extern void sync_supers(kdev_t dev, int wait);
@@ -1459,6 +1477,7 @@
extern int generic_file_mmap(struct file *, struct vm_area_struct *);
extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *);
+extern int precheck_file_write(struct file *, struct inode *, size_t *, loff_t *);
extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *);
extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t);
extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
@@ -1523,6 +1542,9 @@
extern int inode_change_ok(struct inode *, struct iattr *);
extern int inode_setattr(struct inode *, struct iattr *);
+/* kernel/fork.c */
+extern int unshare_files(void);
+
/*
* Common dentry functions for inclusion in the VFS
* or in other stackable file systems. Some of these
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)