Skip to contentSkip to conversation

fs: imgdafs: Add IMG DAFS filesystem for metag

PATCH Superseded James Hogan 1 participant 2 messages May 9, 2013 – Jun 12, 2013 VFS

v8 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

PATCH v8 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.

Cc Alexander Viro <[email protected]>

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

v7:
* 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:
* use file_inode() helper introduced in v3.9-rc1
* remove dafs_iops as it only contained directory methods
* add MODULE_ALIAS_FS()

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

v4:
* clean up fscall similarly to chancall in tty/metag_da

v2:
* 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         | 842 +++++++++++++++++++++++++++++++++++++++++++++
 include/uapi/linux/magic.h |   1 +
 7 files changed, 940 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 c229f82..839ef10 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 4fe6df3..25a93c7 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 0000000..844e6cf
@@ -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 0000000..169a3c6
@@ -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 +842 -0

842 lines not on this page · raw message

include/uapi/linux/magic.h +1 -0
index 2944278..0acdf2a 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
#1 lore raw

Hi Al,

Quoted 6 lines · James Hogan

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.

Cc Alexander Viro <[email protected]>

Is this patch acceptable for v3.11?

Thanks
James

Quoted 42 lines

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

v7:
* 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:
* use file_inode() helper introduced in v3.9-rc1
* remove dafs_iops as it only contained directory methods
* add MODULE_ALIAS_FS()

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

v4:
* clean up fscall similarly to chancall in tty/metag_da

v2:
* 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         | 842 +++++++++++++++++++++++++++++++++++++++++++++
 include/uapi/linux/magic.h |   1 +
 7 files changed, 940 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