Skip to contentSkip to conversation

fs: imgdafs: Add IMG DAFS filesystem for metag

PATCH New James Hogan 1 participant 1 message Dec 13, 2013 VFS

lore
Share & tools
lore
#0 lore raw

PATCH v10 1/1 fs: imgdafs: Add IMG DAFS filesystem for metag

Add the IMG Debug Adapter File System (DAFS) for metag, which uses SWITCH operations to communicate with a file server on a host computer via a JTAG debug adapter.

---
I haven't received any feedback on this patch since v6 in March. If it's acceptable, how should it find its way into mainline? I'm happy to take it in the arch/metag tree if somebody on the fs side would be willing to ACK it.

v10 (Dec 2013):
* add release() callback to write back file mappings (same problem as fixed in hostfs by commit 65984ff9d217 um: hostfs: Fix writeback)
* implement basic fsync() to write back file mappings
* use simple_dentry_operations, like hostfs change in commit

    b26d4cd385fc (consolidate simple ->d_delete() instances)

v9 (Jul 2013):
* updated dafs_readdir to use iterate() file operation and dir_emit() to match changes in v3.11-rc1.

v8 (May 2013):
* enabled building as a module (commit e605ff8 merged during v3.10 merge window exports the necessary symbols)

v7 (Mar 2013):
* use explicit sized types in da_stat and da_finddata (Al Viro)
* move IMGDAFS_SUPER_MAGIC to <linux/magic.h> (Al Viro)
* use fmode_t instead of int in a couple of places (Al Viro)
* removed "will unlock" comment (Al Viro)
* use kmalloc and init hi->mode explicitly (Al Viro)
* kmalloc instead of using dynamic array for path (Al Viro)
* use file_inode() helper in dafs_readdir (Al Viro)

v6 (Mar 2013):
* use file_inode() helper introduced in v3.9-rc1
* remove dafs_iops as it only contained directory methods
* add MODULE_ALIAS_FS()

v5 (Mar 2013):
* removed arch/metag changes (the arch/metag patchset it was previously part of is now mainline with those changes)

v4 (Jan 2013):
* clean up fscall similarly to chancall in tty/metag_da

v2 (Dec 2012):
* fixed fserrno problem (Al Viro)
* renamed to imgdafs

---
 fs/Kconfig                 |   1 +
 fs/Makefile                |   1 +
 fs/imgdafs/Kconfig         |   6 +
 fs/imgdafs/Makefile        |   7 +
 fs/imgdafs/imgdafs.h       |  82 +++++
 fs/imgdafs/inode.c         | 843 +++++++++++++++++++++++++++++++++++++++++++++
 include/uapi/linux/magic.h |   1 +
 7 files changed, 941 insertions(+)
 create mode 100644 fs/imgdafs/Kconfig
 create mode 100644 fs/imgdafs/Makefile
 create mode 100644 fs/imgdafs/imgdafs.h
 create mode 100644 fs/imgdafs/inode.c
fs/Kconfig +1 -0
index c229f828eb01..839ef10842eb 100644
@@ -212,6 +212,7 @@ source "fs/ufs/Kconfig"
 source "fs/exofs/Kconfig"
 source "fs/f2fs/Kconfig"
 source "fs/efivarfs/Kconfig"
+source "fs/imgdafs/Kconfig"
 
 endif # MISC_FILESYSTEMS
 
fs/Makefile +1 -0
index 4fe6df3ec28f..25a93c793b74 100644
@@ -126,3 +126,4 @@ obj-y				+= exofs/ # Multiple modules
 obj-$(CONFIG_CEPH_FS)		+= ceph/
 obj-$(CONFIG_PSTORE)		+= pstore/
 obj-$(CONFIG_EFIVAR_FS)		+= efivarfs/
+obj-$(CONFIG_IMGDAFS_FS)	+= imgdafs/
fs/imgdafs/Kconfig new file +6 -0
new file mode 100644
index 000000000000..844e6cf0e9ed
@@ -0,0 +1,6 @@
+config IMGDAFS_FS
+	tristate "Meta DA filesystem support"
+	depends on METAG_DA
+	help
+	  This enables the DA filesystem, which allows Linux to
+	  to access files on a system attached via a debug adapter.
fs/imgdafs/Makefile new file +7 -0
new file mode 100644
index 000000000000..169a3c6b5fa4
@@ -0,0 +1,7 @@
+#
+# Makefile for DAfs the Debug Adapter filesystem.
+#
+
+obj-$(CONFIG_IMGDAFS_FS) += imgdafs.o
+
+imgdafs-objs := inode.o
fs/imgdafs/imgdafs.h new file +82 -0

82 lines not on this page · raw message

fs/imgdafs/inode.c new file +843 -0

843 lines not on this page · raw message

include/uapi/linux/magic.h +1 -0
index 77c60311a6c6..2487967f5e96 100644
@@ -31,6 +31,7 @@
 #define PSTOREFS_MAGIC		0x6165676C
 #define EFIVARFS_MAGIC		0xde5e81e4
 #define HOSTFS_SUPER_MAGIC	0x00c0ffee
+#define IMGDAFS_SUPER_MAGIC	0xdadadaf5
 
 #define MINIX_SUPER_MAGIC	0x137F		/* minix v1 fs, 14 char names */
 #define MINIX_SUPER_MAGIC2	0x138F		/* minix v1 fs, 30 char names */
Signature · 1 line
1.8.1.2