Skip to contentSkip to conversation

libfs

PATCH New Christoph Hellwig 1 participant 1 message Apr 5, 2003

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

PATCH 1/1 libfs

Al added fs/libfs.c for common library routines used by filesysems a while ago, but we have a lot more such library funcions, say fs/exportfs/ or stuff scribbled all over the core VFS files.

This patch adds a fs/libfs/ dir instead, starting with simple.c (simple, ramfs-based filesystems), symlink.c (pagecache-based symlink code) and export.c (Neil's common export helpers). In the long term I think it's a good idea too, to have the prototypes for all this (and whatever we more over) to <linux/libfs.h> so it's clear they are only intended for filesystem driver, and we don't get into situations like those people trying to use do_generic_file_read from inkernel servers like in 2.4.

(I've send this as combined BK/plain patch because the BK patch
can track the renames, but the plain patch works fine aswell)

You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

===================================================================

[email protected], 2003-04-05 21:08:39-05:00, [email protected]
libfs cleanup

 b/fs/Makefile        |    5 
 b/fs/libfs/Makefile  |    3 
 b/fs/libfs/export.c  |  536 +++++++++++++++++++++++++++++++++++++++++++++++++++
 b/fs/libfs/simple.c  |  334 +++++++++++++++++++++++++++++++
 b/fs/libfs/symlink.c |  100 +++++++++
 b/fs/namei.c         |  101 ---------
 fs/exportfs/expfs.c  |  536 ---------------------------------------------------
 fs/libfs.c           |  334 -------------------------------
 8 files changed, 976 insertions(+), 973 deletions(-)
fs/Makefile +2 -3
diff -Nru a/fs/Makefile b/fs/Makefile
@@ -5,11 +5,11 @@
 # Rewritten to use lists instead of if-statements.
 # 
 
-obj-y :=	open.o read_write.o file_table.o buffer.o \
+obj-y :=	libfs/ open.o read_write.o file_table.o buffer.o \
 		bio.o super.o block_dev.o char_dev.o stat.o exec.o pipe.o \
 		namei.o fcntl.o ioctl.o readdir.o select.o fifo.o locks.o \
 		dcache.o inode.o attr.o bad_inode.o file.o dnotify.o \
-		filesystems.o namespace.o seq_file.o xattr.o libfs.o \
+		filesystems.o namespace.o seq_file.o xattr.o \
 		fs-writeback.o mpage.o direct-io.o aio.o eventpoll.o
 
 obj-$(CONFIG_COMPAT) += compat.o
@@ -66,7 +66,6 @@
 obj-$(CONFIG_HFS_FS)		+= hfs/
 obj-$(CONFIG_VXFS_FS)		+= freevxfs/
 obj-$(CONFIG_NFS_FS)		+= nfs/
-obj-$(CONFIG_EXPORTFS)		+= exportfs/
 obj-$(CONFIG_NFSD)		+= nfsd/
 obj-$(CONFIG_LOCKD)		+= lockd/
 obj-$(CONFIG_NLS)		+= nls/
fs/exportfs/expfs.c deleted +0 -536

536 lines not on this page · raw message

fs/libfs/Makefile new file +3 -0
diff -Nru a/fs/libfs/Makefile b/fs/libfs/Makefile
@@ -0,0 +1,3 @@
+
+obj-y			+= simple.o symlink.o
+obj-$(CONFIG_EXPORTFS)	+= export.o
fs/libfs/export.c new file +536 -0

536 lines not on this page · raw message

fs/libfs/simple.c new file +334 -0

334 lines not on this page · raw message

fs/libfs/symlink.c new file +100 -0

100 lines not on this page · raw message

fs/libfs.c deleted +0 -334

334 lines not on this page · raw message

fs/namei.c +1 -100

110 lines not on this page · raw message

===================================================================

This BitKeeper patch contains the following changesets:
1.1034
## Wrapped with gzip_uu ##

M'XL( "*1CSX ]59>W/;-A+_6_P4V\G-G:SJ 1(D)2J5QVWLM)X\G%&23F>:
M&PY(0A)/%,'CPXYZRG?O B1EO>Q$;IR[BS42 ^PN=G_[ L G\#[CZ; Q\V?:
M$_A%9/FPD7E=+PM$'(4Q[XITBA-C(7"B=R/2>0])>RE/1 _GBX\=HVMI2/&& MY?X,KGF:#1MZEZY'\F7"AXWQQ<_O7_XXUK31")[-6#SE;WD.HY&6B_2:14%V MQO)9).)NGK(X6_"<=7VQ6*U)5P8A!OY9>I\2RU[I-C'[*U\/=)V9.@^(80YL M4V/SLT7A=P.^S4F)B9P#?4#-E6'W;5L[![VK$VH"H3UB]H@%ACXD@R%U.L0:
M$@)HY-DN#O"]#1VB_01?5^EGF@]1Z$TR\"/.XB+17H")REK:FUNLM,Z1_S2- M,**='C1D-<EZ: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