/*
* NOTE!! This doesn' thave to be exact - we just have
@@ -565,6 +566,6 @@
* entries. Don't panic if you notice that this hasn't
* been shrunk every time we add a new system call.
*/
- .rept NR_syscalls-189
+ .rept NR_syscalls-190
.long SYMBOL_NAME(sys_ni_syscall)
.endr
--- arch/m68k/kernel/entry.S.~1~ Mon Dec 7 23:11:00 1998
+++ arch/m68k/kernel/entry.S Mon Dec 7 23:11:05 1998
@@ -586,6 +586,7 @@
.long SYMBOL_NAME(sys_sendfile)
.long SYMBOL_NAME(sys_ni_syscall) /* streams1 */
.long SYMBOL_NAME(sys_ni_syscall) /* streams2 */
+ .long SYMBOL_NAME(sys_fsattr)
/* We do this in a two stage process. We first try to request
as many blocks as we can, then we wait for the first one to
--- fs/buffer.c.~1~ Mon Dec 7 23:11:00 1998
+++ fs/buffer.c Tue Dec 8 17:49:24 1998
@@ -891,7 +891,7 @@
bh->b_dev_id = dev_id;
}
-static void end_buffer_io_sync(struct buffer_head *bh, int uptodate)
+void end_buffer_io_sync(struct buffer_head *bh, int uptodate)
{
mark_buffer_uptodate(bh, uptodate);
unlock_buffer(bh);
@@ -1048,8 +1048,10 @@
remove_from_hash_queue(buf);
buf->b_dev = NODEV;
refile_buffer(buf);
- if (!--buf->b_count)
+ if (!--buf->b_count) {
+ try_to_free_buffer(buf, &buf, 6);
return;
+ }
printk("VFS: forgot an in-use buffer! (count=%d)\n",
buf->b_count);
}
@@ -1192,7 +1194,7 @@
* no-buffer-head deadlock. Return NULL on failure; waiting for
* buffer heads is now handled in create_buffers().
*/
-static struct buffer_head * get_unused_buffer_head(int async)
+struct buffer_head * get_unused_buffer_head(int async)
{
struct buffer_head * bh;
@@ -1345,7 +1347,7 @@
* Free all temporary buffers belonging to a page.
* This needs to be called with interrupts disabled.
*/
-static inline void free_async_buffers (struct buffer_head * bh)
+void free_async_buffers (struct buffer_head * bh)
{
struct buffer_head *tmp, *tail;
#define __sys2(x) #x
#define __sys1(x) __sys2(x)
--- include/asm-i386/fcntl.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/asm-i386/fcntl.h Mon Dec 7 23:11:05 1998
@@ -16,7 +16,7 @@
#define O_NDELAY O_NONBLOCK
#define O_SYNC 010000
#define FASYNC 020000 /* fcntl, for BSD compatibility */
-#define O_DIRECT 040000 /* direct disk access hint - currently ignored */
+#define O_DIRECT 040000 /* direct disk access hint */
#define O_LARGEFILE 0100000
#define O_DIRECTORY 0200000 /* must be a directory */
#define O_NOFOLLOW 0400000 /* don't follow links */
--- include/asm-i386/unistd.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/asm-i386/unistd.h Mon Dec 7 23:11:05 1998
@@ -194,6 +194,7 @@
#define __NR_sendfile 187
#define __NR_getpmsg 188 /* some people actually want streams */
#define __NR_putpmsg 189 /* some people actually want streams */
+#define __NR_fsattr 190
/* user-visible error numbers are in the range -1 - -122: see <asm-i386/errno.h> */
--- include/asm-m68k/fcntl.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/asm-m68k/fcntl.h Mon Dec 7 23:11:05 1998
@@ -18,6 +18,7 @@
#define FASYNC 020000 /* fcntl, for BSD compatibility */
#define O_DIRECTORY 040000 /* must be a directory */
#define O_NOFOLLOW 0100000 /* don't follow links */
+#define O_DIRECT 0200000 /* direct disk access hint */
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get f_flags */
--- include/asm-m68k/unistd.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/asm-m68k/unistd.h Mon Dec 7 23:11:05 1998
@@ -193,6 +193,7 @@
#define __NR_sendfile 187
#define __NR_getpmsg 188 /* some people actually want streams */
#define __NR_putpmsg 189 /* some people actually want streams */
+#define __NR_fsattr 190
/* user-visible error numbers are in the range -1 - -122: see
<asm-m68k/errno.h> */
--- include/asm-mips/fcntl.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/asm-mips/fcntl.h Mon Dec 7 23:11:05 1998
@@ -25,7 +25,7 @@
#define FASYNC 0x1000 /* fcntl, for BSD compatibility */
#define O_LARGEFILE 0x2000 /* allow large file opens - currently ignored */
#define O_NOFOLLOW 0x4000 /* Don't follow symbolic links */
-#define O_DIRECT 0x8000 /* direct disk access hint - currently ignored */
+#define O_DIRECT 0x8000 /* direct disk access hint */
#define O_DIRECTORY 0x10000 /* must be a directory */
/*
* Offset of the last Linux flavoured syscall
*/
-#define __NR_Linux_syscalls 209
+#define __NR_Linux_syscalls 210
#ifndef _LANGUAGE_ASSEMBLY
--- include/asm-ppc/fcntl.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/asm-ppc/fcntl.h Mon Dec 7 23:11:05 1998
@@ -17,6 +17,7 @@
#define O_SYNC 010000
#define FASYNC 020000 /* fcntl, for BSD compatibility */
#define O_DIRECTORY 040000 /* must be a directory */
+#define O_DIRECT 080000 /* direct disk access hint */
#define O_NOFOLLOW 0100000 /* don't follow links */
#define F_DUPFD 0 /* dup */
--- include/asm-ppc/unistd.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/asm-ppc/unistd.h Mon Dec 7 23:11:05 1998
@@ -193,6 +193,7 @@
#define __NR_sendfile 186
#define __NR_getpmsg 187 /* some people actually want streams */
#define __NR_putpmsg 188 /* some people actually want streams */
+#define __NR_fsattr 189
#define __NR(n) #n
--- include/asm-sparc/fcntl.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/asm-sparc/fcntl.h Mon Dec 7 23:11:05 1998
@@ -19,6 +19,7 @@
#define O_NOCTTY 0x8000 /* not fcntl */
#define O_DIRECTORY 0x10000 /* must be a directory */
#define O_NOFOLLOW 0x20000 /* don't follow links */
+#define O_DIRECT 0x40000 /* raw, unbuffered access requested */
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get f_flags */
--- include/asm-sparc/unistd.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/asm-sparc/unistd.h Mon Dec 7 23:11:05 1998
@@ -271,6 +271,7 @@
#define __NR_fdatasync 253
#define __NR_nfsservctl 254
#define __NR_aplib 255
+#define __NR_fsattr 256 /* Linux Specific */
#define _syscall0(type,name) \
type name(void) \
--- include/asm-sparc64/fcntl.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/asm-sparc64/fcntl.h Mon Dec 7 23:11:05 1998
@@ -19,6 +19,7 @@
#define O_NOCTTY 0x8000 /* not fcntl */
#define O_DIRECTORY 0x10000 /* must be a directory */
#define O_NOFOLLOW 0x20000 /* don't follow links */
+#define O_DIRECT 0x40000 /* direct disk access hint */
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get f_flags */
--- include/asm-sparc64/unistd.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/asm-sparc64/unistd.h Mon Dec 7 23:11:05 1998
@@ -271,6 +271,7 @@
#define __NR_fdatasync 253
#define __NR_nfsservctl 254
#define __NR_aplib 255
+#define __NR_fsattr 256 /* Linux Specific */
#define _syscall0(type,name) \
type name(void) \
--- include/linux/ext2_fs.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/linux/ext2_fs.h Tue Dec 8 17:36:16 1998
@@ -198,10 +198,11 @@
#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
/* End compression flags --- maybe not all used */
#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
+#define EXT2_DIRECT_FL 0x00002000 /* force unbuffered io */
#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
-#define EXT2_FL_USER_VISIBLE 0x00001FFF /* User visible flags */
-#define EXT2_FL_USER_MODIFIABLE 0x000000FF /* User modifiable flags */
+#define EXT2_FL_USER_VISIBLE 0x00003FFF /* User visible flags */
+#define EXT2_FL_USER_MODIFIABLE 0x000020FF /* User modifiable flags */
/*
* ioctl commands
@@ -569,6 +570,7 @@
/* ioctl.c */
extern int ext2_ioctl (struct inode *, struct file *, unsigned int,
unsigned long);
+extern int ext2_fsattr (struct inode *, unsigned int, int *, int *);
/* namei.c */
extern void ext2_release (struct inode *, struct file *);
--- include/linux/fs.h.~1~ Mon Dec 7 23:11:01 1998
+++ include/linux/fs.h Wed Dec 9 17:17:20 1998
@@ -95,6 +95,7 @@
#define S_IMMUTABLE 512 /* Immutable file */
#define MS_NOATIME 1024 /* Do not update access times. */
#define MS_NODIRATIME 2048 /* Do not update directory access times */
+#define S_DIRECT 4096 /* Force raw (O_DIRECT) access */
/*
* Flags that can be altered by MS_REMOUNT
@@ -298,6 +299,12 @@
#define ATTR_FORCE 512 /* Not a change, but a change it */
#define ATTR_ATTR_FLAG 1024
+/*
+ * How many __u32s are required to encode the maximum legal attribute?
+ */
+#define MAXATTRLEN 1
+
+
/*
* This is the Inode Attributes structure, used for notify_change(). It
* uses the above definitions as flags, to know which values have changed.
@@ -327,6 +334,10 @@
#define ATTR_FLAG_APPEND 4 /* Append-only file */
#define ATTR_FLAG_IMMUTABLE 8 /* Immutable file */
#define ATTR_FLAG_NODIRATIME 16 /* Don't update atime for directory */
+#define ATTR_FLAG_DIRECT 32 /* Force unbuffered IO */
+#define ATTR_FLAG_NODUMP 64 /* Do not dump(8) this file */
+#define ATTR_FLAG_COMPRESS 128 /* Try to compress this file */
+#define ATTR_FLAG_BTREE 256 /* Use btree format on dir */
/*
* Includes for diskquotas and mount structures.
@@ -438,6 +449,7 @@
#define FL_BROKEN 4 /* broken flock() emulation */
#define FL_ACCESS 8 /* for processes suspended by mandatory locking */
#define FL_LOCKD 16 /* lock held by rpc.lockd */
+#define FL_DIRECT 32 /* opened for raw (O_DIRECT) access */
/*
* The POSIX file lock owner is determined by
@@ -621,6 +633,7 @@
int (*remount_fs) (struct super_block *, int *, char *);
void (*clear_inode) (struct inode *);
void (*umount_begin) (struct super_block *);
+ int (*fsattr) (struct inode *, unsigned int, int *, int *);
};
struct dquot_operations {
@@ -832,8 +845,13 @@
extern struct buffer_head * bread(kdev_t dev, int block, int size);
extern struct buffer_head * breada(kdev_t dev,int block, int size,
unsigned int pos, unsigned int filesize);
+extern void end_buffer_io_sync(struct buffer_head *bh, int uptodate);
+extern struct buffer_head * get_unused_buffer_head(int async);
+extern void free_async_buffers (struct buffer_head * bh);
extern int brw_page(int, struct page *, kdev_t, int [], int, int);
+extern int rw_raw_io (int, int, int (*bmap) (struct inode *, int),
+ struct inode *, const char *, size_t, loff_t *, int);
extern int generic_readpage(struct file *, struct page *);
extern int generic_file_mmap(struct file *, struct vm_area_struct *);
--- include/linux/swap.h.~1~ Mon Dec 7 12:05:54 1998
+++ include/linux/swap.h Mon Dec 7 18:55:55 1998
@@ -90,6 +90,7 @@
extern struct page * read_swap_cache_async(unsigned long, int);
#define read_swap_cache(entry) read_swap_cache_async(entry, 1);
extern int FASTCALL(swap_count(unsigned long));
+extern struct page * lookup_swap_cache(unsigned long);
/*
* Make these inline later once they are working properly.
*/