* [PATCH] large offset llseek breaks for device special files on ac series [not found] <E15CSrl-0006jf-00@the-village.bc.nu> @ 2001-06-19 23:24 ` Martin Frey 2001-06-20 5:53 ` Martin Frey 0 siblings, 1 reply; 2+ messages in thread From: Martin Frey @ 2001-06-19 23:24 UTC (permalink / raw) To: 'Alan Cox', zippel, tigran, hch, asun, mikulas, jffs-dev, dwmw2, trond.myklebust, aia21, reiserfs-dev Cc: baettig, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1355 bytes --] Dear all, The ac-kernel series include a check in default_llseek() to not set the file position beyond the file systems maximum file size. This check should be done only for regular files, e.g. for a device special file the test does not make sense. Alan suggested that we remove the check from the default_llseek method and introduce a generic_file_llseek() method that checks the maximum file size. The generic_file_llseek() method needs to be put in all file systems in order to test for the maximum file size. I send the mail with the patch to all maintainers of file systems, please comment. Here is the patch. I put the generic_file_llseek into adfs, affs, bfs, coda, ext2, fat, free_vxfs, hfs, hpfs, jffs, jffs2, minix, ncpfs, nfs, ntfs, openpromfs, qnx4, ramfs, reiserfs, smbfs, sysv, and udf. hfs got two additional llseek methods for the metadata, same for openpromfs. The patch applies to 2.4.5 ac 16. The cmsfs directory produces an object file with the wrong name, the patch fixes the cmsfs/Makefile do produce the right object file. Especially the hfs and openpromfs modifications should be checked. I did not touch the other file systems, there is either no file read or write, or a fix is not straight forward. I did not modifiy the proc file system, the llseek problem should be fixed there in a more general way. Regards, Martin [-- Attachment #2: patch-fs.2.4.5.ac16.gz --] [-- Type: application/x-gzip, Size: 2748 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH] large offset llseek breaks for device special files on ac series 2001-06-19 23:24 ` [PATCH] large offset llseek breaks for device special files on ac series Martin Frey @ 2001-06-20 5:53 ` Martin Frey 0 siblings, 0 replies; 2+ messages in thread From: Martin Frey @ 2001-06-20 5:53 UTC (permalink / raw) To: 'Alan Cox', zippel, tigran, hch, asun, mikulas, jffs-dev, dwmw2, trond.myklebust, aia21, reiserfs-dev Cc: baettig, linux-kernel >Here is the patch. Sorry, at least most of the patch was there. Here is the rest: diff -r -u -N -b linux-2.4.5.ac16/include/linux/fs.h linux-2.4.5.ac16.patched/include/linux/fs.h --- linux-2.4.5.ac16/include/linux/fs.h Tue Jun 19 15:12:50 2001 +++ linux-2.4.5.ac16.patched/include/linux/fs.h Tue Jun 19 18:28:47 2001 @@ -1336,6 +1336,7 @@ extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t); extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *); +extern loff_t generic_file_llseek(struct file *, loff_t, int); extern int generic_file_open(struct inode *, struct file *); extern struct file_operations generic_ro_fops; diff -r -u -N -b linux-2.4.5.ac16/kernel/ksyms.c linux-2.4.5.ac16.patched/kernel/ksyms.c --- linux-2.4.5.ac16/kernel/ksyms.c Tue Jun 19 15:13:08 2001 +++ linux-2.4.5.ac16.patched/kernel/ksyms.c Wed Jun 20 01:41:21 2001 @@ -245,6 +245,7 @@ EXPORT_SYMBOL(vfs_unlink); EXPORT_SYMBOL(vfs_rename); EXPORT_SYMBOL(vfs_statfs); +EXPORT_SYMBOL(generic_file_llseek); EXPORT_SYMBOL(generic_read_dir); EXPORT_SYMBOL(__pollwait); EXPORT_SYMBOL(poll_freewait); ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-06-20 5:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E15CSrl-0006jf-00@the-village.bc.nu>
2001-06-19 23:24 ` [PATCH] large offset llseek breaks for device special files on ac series Martin Frey
2001-06-20 5:53 ` Martin Frey
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox