fs: imgdafs: Add IMG DAFS filesystem for metag
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.
---
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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]>
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 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)v6:
* usefile_inode()helper introduced in v3.9-rc1
* removedafs_iopsas it only contained directory methods
* addMODULE_ALIAS_FS()v5:
* removedarch/metagchanges (thearch/metagpatchset it was previously part of is now mainline with those changes)v4:
* clean up fscall similarly to chancall in tty/metag_dav2:
* fixed fserrno problem (Al Viro)
* renamed to imgdafsfs/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