fs: imgdafs: Add IMG DAFS filesystem for metag
PATCH v7 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.
---
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
@@ -211,6 +211,7 @@ source "fs/sysv/Kconfig" source "fs/ufs/Kconfig" source "fs/exofs/Kconfig" source "fs/f2fs/Kconfig" +source "fs/imgdafs/Kconfig" endif # MISC_FILESYSTEMS
fs/Makefile +1 -0
@@ -127,3 +127,4 @@ obj-$(CONFIG_F2FS_FS) += f2fs/ obj-y += exofs/ # Multiple modules obj-$(CONFIG_CEPH_FS) += ceph/ obj-$(CONFIG_PSTORE) += pstore/ +obj-$(CONFIG_IMGDAFS_FS) += imgdafs/
fs/imgdafs/Kconfig new file +6 -0
@@ -0,0 +1,6 @@ +config IMGDAFS_FS + bool "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
@@ -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
@@ -29,6 +29,7 @@#define JFFS2_SUPER_MAGIC 0x72b6#define PSTOREFS_MAGIC 0x6165676C#define EFIVARFS_MAGIC 0xde5e81e4 +#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
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.
Signed-off-by James Hogan <[email protected]>Cc Alexander Viro <[email protected]>
Quoted 9 lines
---
v7:
* use explicit sized types inda_statandda_finddata(Al Viro)
* moveIMGDAFS_SUPER_MAGICto <linux/magic.h> (Al Viro)
* usefmode_tinstead of int in a couple of places (Al Viro)
* removed "will unlock" comment (Al Viro)
* use kmalloc and inithi->modeexplicitly (Al Viro)
* kmalloc instead of using dynamic array for path (Al Viro)
* usefile_inode()helper indafs_readdir(Al Viro)
Does this latest version look okay for v3.10?
Cheers
James