iumfs-tmpfs-0.1.tar.gz

iumfs.c
iumfs_vnode.c
iumfs.h
iumfs_mount.c
Makefile.in
configure.in
configure
fstest.c
test.sh
install-sh

http://github.com/kaizawa/iumfs-tmpfs

OpenSolaris


Sparc
(32bit)
Sparc
(64bit)
x86x64
????
Solaris10-??
OpenSolaris-?






sys/modctl.h
sys/vfs.h
sys/vnode.h


_init(9E)
_info(9E)
_fini(9E)


_init() 
{ 
   int err;
   
   err = mod_install(&modlinkage);
         ^^^^^^^^^^^^^^^^^^^^^^^^^
   return (err);
}


     |

            |

            |

		       |

		       |

			        |

				|

				|
				...
     |

            |

            |

		       |


       err = vfs_setfsops(fstype, iumfs_vfs_ops_def_array, &iumfs_vfsops);
                                  ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~




IUMFSUFS
vfs_mount
vfs_umount
vfs_root
vfs_statvfs
vfs_vget
vfs_sync
vfs_mountroot
IUMFSUFS
vop_open
vop_close
vop_read
vop_write
vop_ioctl
vop_setfl
vop_getattr
vop_setattr
vop_access
vop_lookup
vop_create
vop_remove
vop_link
vop_rename
vop_mkdir
vop_rmdir
vop_readdir
vop_symlink
vop_readlink
vop_fsync
vop_inactive
vop_fid
vop_rwlock
vop_rwunlock
vop_seek
vop_cmp
vop_frlock
vop_space
vop_realvp
vop_getpage
vop_putpage
vop_map
vop_addmap
vop_delmap
vop_poll
vop_dump
vop_pathconf?
vop_pageio?
vop_dumpctl?
vop_dispose?
vop_setsecattr
vop_getsecattr
vop_shrlock?






iumfs_mount.c

main(int argc, char *argv[])
{
   if (argc != 3){
       printf("Usage: %s -F iumfs strings mount_point\n", argv[0]);
       exit(0);
   }
   
   if ( mount(argv[1], argv[2], MS_DATA, "iumfs", NULL, 0) < 0 ){        
	perror("mount");
       exit(0);
   }
   return(0);    
}


OpenSolaris

$ ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /bin/ginstall -c
checking for isainfo... yes
configure: creating ./config.status
config.status: creating Makefile

# make
gcc -c -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" 
-DPACKAGE_BUGREPORT=\"\" -g -O2 -Wall -DOPENSOLARIS -DSOL10 -m64 -mcmodel=kernel -mno-red-zone 
-D_KERNEL -I. iumfs.c -o iumfs.o
gcc -c -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" 
-DPACKAGE_BUGREPORT=\"\" -g -O2 -Wall -DOPENSOLARIS -DSOL10 -m64 -mcmodel=kernel -mno-red-zone 
-D_KERNEL -I. iumfs_vnode.c -o iumfs_vnode.o
ld -dn -r iumfs.o iumfs_vnode.o -o iumfs
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" 
-DPACKAGE_BUGREPORT=\"\" -g -O2 -Wall -DOPENSOLARIS -DSOL10 -m64 iumfs_mount.c -o mount
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" 
-DPACKAGE_BUGREPORT=\"\" -g -O2 -Wall -DOPENSOLARIS -DSOL10 -m64 fstest.c -o fstest

# make install
/bin/ginstall -c -m 0644 -o root -g sys iumfs /kernel/fs/amd64
/usr/sbin/modload iumfs
/bin/ginstall -c -d -m 0755 -o root -g bin /usr/lib/fs/iumfs
/bin/ginstall -c -m 0755 -o root -g bin mount /usr/lib/fs/iumfs

# make uninstall
/usr/sbin/modunload -i `modinfo |grep iumfs | awk '{print }'`
rm /kernel/fs/amd64/iumfs
rm /usr/lib/fs/iumfs/mount
rm -rf /usr/lib/fs/iumfs

# make uninstall
/usr/sbin/modunload -i `modinfo |grep iumfs | awk '{print }'`
can't unload the module: Device busy
*** Error code 16 (ignored)
rm /kernel/fs/amd64/iumfs
rm /usr/lib/fs/iumfs/mount
rm -rf /usr/lib/fs/iumfs

Usage: mount -F iumfs strings mount_point


# /usr/sbin/mount -F iumfs hoge /mnt
#
# mount
...
...
/mnt on hoge read/write/setuid/devices/dev=ffffffff on Thu Nov 10 00:20:14 2005
        ^^^^

# cd /mnt
# ls -lai


# echo "sample text" > file.txt
# mkdir dir
# ls -lai




# cat file.txt
sample text
# rm file.txt
# rm -r dir
# ls -lia


# cp /etc/motd /mnt
# ls -lai




# cat motd
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

# cd /mnt
# touch file.txt
# ls -li file.txt
# chmod 777 file.txt
# ls -li file.txt
# touch file.txt
# ls -li file.txt
# chown nobody file.txt

#

Usage: umount mount_point

# umount /mnt
#
# pwd
/mnt
# umount /mnt






  1. OpenSolaris


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS