Skip to contentSkip to conversation

qnx4: remove write support

PATCH In review Anders Larsen 3 participants 3 messages Aug 22, 2009 – Aug 24, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qnx4: remove write support

From: Christoph Hellwig <[email protected]>

qnx4 write support has never been fully implemented, is broken since the dawn of time and hasn't been actively developed since before git history started.

Instead of letting it further bitrot and complicate API transition (like the new truncate code) remove it.

fs/qnx4/Makefile +1 -1
Index: linux-2.6/fs/qnx4/Makefile
===================================================================
@@ -4,4 +4,4 @@
 obj-$(CONFIG_QNX4FS_FS) += qnx4.o
-qnx4-objs := inode.o dir.o namei.o file.o bitmap.o truncate.o
+qnx4-objs := inode.o dir.o namei.o bitmap.o
fs/qnx4/bitmap.c +0 -81

83 lines not on this page · raw message

fs/qnx4/dir.c +0 -5
Index: linux-2.6/fs/qnx4/dir.c
===================================================================
@@ -85,9 +85,4 @@ const struct file_operations qnx4_dir_op
 const struct inode_operations qnx4_dir_inode_operations =
 {
 	.lookup		= qnx4_lookup,
-#ifdef CONFIG_QNX4FS_RW
-	.create		= qnx4_create,
-	.unlink		= qnx4_unlink,
-	.rmdir		= qnx4_rmdir,
-#endif
 };
fs/qnx4/file.c deleted +0 -40
Index: linux-2.6/fs/qnx4/file.c
===================================================================
@@ -1,40 +0,0 @@
-/*
- * QNX4 file system, Linux implementation.
- *
- * Version : 0.2.1
- *
- * Using parts of the xiafs filesystem.
- *
- * History :
- *
- * 25-05-1998 by Richard Frowijn : first release.
- * 21-06-1998 by Frank Denis : wrote qnx4_readpage to use generic_file_read.
- * 27-06-1998 by Frank Denis : file overwriting.
- */
-
-#include "qnx4.h"
-
-/*
- * We have mostly NULL's here: the current defaults are ok for
- * the qnx4 filesystem.
- */
-const struct file_operations qnx4_file_operations =
-{
-	.llseek		= generic_file_llseek,
-	.read		= do_sync_read,
-	.aio_read	= generic_file_aio_read,
-	.mmap		= generic_file_mmap,
-	.splice_read	= generic_file_splice_read,
-#ifdef CONFIG_QNX4FS_RW
-	.write		= do_sync_write,
-	.aio_write	= generic_file_aio_write,
-	.fsync		= simple_fsync,
-#endif
-};
-
-const struct inode_operations qnx4_file_inode_operations =
-{
-#ifdef CONFIG_QNX4FS_RW
-	.truncate	= qnx4_truncate,
-#endif
-};
fs/qnx4/inode.c +1 -83

109 lines not on this page · raw message

fs/qnx4/namei.c +0 -105

107 lines not on this page · raw message

fs/qnx4/qnx4.h +0 -8
Index: linux-2.6/fs/qnx4/qnx4.h
===================================================================
@@ -29,17 +29,9 @@ extern unsigned long qnx4_block_map(stru
 extern struct buffer_head *qnx4_bread(struct inode *, int, int);
-extern const struct inode_operations qnx4_file_inode_operations;
 extern const struct inode_operations qnx4_dir_inode_operations;
-extern const struct file_operations qnx4_file_operations;
 extern const struct file_operations qnx4_dir_operations;
 extern int qnx4_is_free(struct super_block *sb, long block);
-extern int qnx4_set_bitmap(struct super_block *sb, long block, int busy);
-extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode, struct nameidata *nd);
-extern void qnx4_truncate(struct inode *inode);
-extern void qnx4_free_inode(struct inode *inode);
-extern int qnx4_unlink(struct inode *dir, struct dentry *dentry);
-extern int qnx4_rmdir(struct inode *dir, struct dentry *dentry);
 static inline struct qnx4_sb_info *qnx4_sb(struct super_block *sb)
 {
fs/qnx4/truncate.c deleted +0 -29
Index: linux-2.6/fs/qnx4/truncate.c
===================================================================
@@ -1,34 +0,0 @@
-/*- * QNX4 file system, Linux implementation.
- *- * Version : 0.1
- *- * Using parts of the xiafs filesystem.
- *- * History :
- *- * 30-06-1998 by Frank DENIS : ugly filler.
- */
-
-#include <linux/smp_lock.h>
-#include "qnx4.h"
-
-#ifdef CONFIG_QNX4FS_RW
-
-void qnx4_truncate(struct inode *inode)
-{
-	if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
-	      S_ISLNK(inode->i_mode))) {
-		return;
-	}
-	lock_kernel();
-	if (!(S_ISDIR(inode->i_mode))) {
-		/* TODO */
-	}
-	QNX4DEBUG(("qnx4: qnx4_truncate called\n"));
-	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
-	mark_inode_dirty(inode);
-	unlock_kernel();
-}
-
-#endif
fs/qnx4/Kconfig +0 -11
Index: linux-2.6/fs/qnx4/Kconfig
===================================================================
@@ -6,20 +6,9 @@ config QNX4FS_FS
 	  QNX 4 and QNX 6 (the latter is also called QNX RTP).
 	  Further information is available at <http://www.qnx.com/>.
 	  Say Y if you intend to mount QNX hard disks or floppies.
-	  Unless you say Y to "QNX4FS read-write support" below, you will
-	  only be able to read these file systems.
 	  To compile this file system support as a module, choose M here: the
 	  module will be called qnx4.
 	  If you don't know whether you need it, then you don't need it:
 	  answer N.
-
-config QNX4FS_RW
-	bool "QNX4FS write support (DANGEROUS)"
-	depends on QNX4FS_FS && EXPERIMENTAL && BROKEN
-	help
-	  Say Y if you want to test write support for QNX4 file systems.
-
-	  It's currently broken, so for now:
-	  answer N.
 
#1 lore raw
Quoted 1 line · On Sat, 22 Aug 2009 15:56:45 +0200 (CEST) [email protected] (Anders Larsen)…

To: [email protected]

This isn't a trivial patch!

Quoted 5 lines

Cc: [email protected], [email protected]
Subject: [PATCH] qnx4: remove write support
Date: Sat, 22 Aug 2009 15:56:45 +0200 (CEST)
Sender: [email protected]

Quoted 8 lines

From: Christoph Hellwig <[email protected]>

qnx4 write support has never been fully implemented, is broken since the dawn of time and hasn't been actively developed since before git history started.

Instead of letting it further bitrot and complicate API transition (like the new truncate code) remove it.

Your email client mangles the patch in mysterious ways. I suggest that you email it to yourself and check that it applies.

#2 lore raw
Quoted 2 lines · Andrew Morton
Quoted 1 line

To: [email protected]

This isn't a trivial patch!

Definitely, I have completely skipped it in terms of trivial queue of course.

Signature · 2 lines
Jiri Kosina
SUSE Labs