QFS Shared File System

04/07/2004

The QFS shared file system is a distributed, multi-host file system which supports direct access to shared mass storage.

This document describes the steps necessary to be a QFS shared client.

Configuration

The client hosts are not connected to the meta data disks. The clients are only connected to the data disks. On the server, execute samfsconfig to build the list of meta and data disks for all the discovered samfs file systems. The samfsconfig output is input to the client configuration file. This utility discovers all samfs file systems. See man mcf.4 which describes the samfsconfig output. Then run the samfsconfig command on the client.

The samfsconfig command on the server ole-mn:

ole-mn<1>samfsconfig /dev/dsk/*

#

# Family Set 'samfs4' Created Sun Jan 12 14:19:25 2003

#

samfs4 40 ma samfs4 – shared

/dev/dsk/c0t1d0s6 41 mm samfs4 -/dev/dsk/c9t50020F2300005D22d0s1 42 mr samfs4 -/dev/dsk/c9t50020F23000065EEd0s1 43 mr samfs4 -

The samfsconfig command on the client cosmic-mn:

cosmic-mn<1>samfsconfig /dev/dsk/*

#

# Family Set 'samfs4' Created Sun Jan 12 14:19:25 2003

#

# Missing slices

# Ordinal 1

# /dev/dsk/c5t50020F2300005D22d0s1 42 mr samfs4 -

# Ordinal 2

# /dev/dsk/c5t50020F23000065EEd0s1 43 mr samfs4 -

Build the client configuration file. There is 1 line per device in the file system. Meta devices are specified with nodev:

samfs4 40 ma samfs4 – shared

nodev 41 mm samfs4 -

dev/dsk/c5t50020F2300005D22d0s1 42 mr samfs4 -

dev/dsk/c5t50020F23000065EEd0s1 43 mr samfs4 -

Put the client configuration file in /etc/opt/SUNWsamfs/client.samfs4.

Client Daemon

The client daemon is responsible for connecting to the metadata server daemon via TCP/IP. The daemon discovers the metadata server from the label block which is in the first data disk of the shared file system. The Solaris source path of the daemon is:

./src/fs/sharefs/client

The only required mount parameter for the daemon is the file system name. In the previous configuration section, the file system name is samfs4. There is an optional parameter “CONFIG” whose presence indicates the daemon was started by mount during the boot sequence (rc2.d). If started by mount, this daemon instance will be killed by the permanent instance. The permanent instance is started by init.

The client opens its configuration file, client.fs_name. It opens all the data disks.

QFS Shared Filesystem Protocol

The QFS shared file system over-the-wire protocol is defined in this document. See

./src/fs/include/share.h

Header - sam_san_header_t

A 56 character header precedes all messages. This header defines the length of the message body. There are 8 major commands; operation specifies the subcommand. The client ordinal is the position in the hosts table. Client ordinals begin at 1 and do not change. The byte size of each field is specified in parenthesis.

magic int64_t
version uint16_t
wait_flag uchar_t
originator uchar_t
command uint16_t
operation uint16_t
length uint16_t
out_length uint16_t
seqno uint32_t
ack uint32_t
error int32_t
client_ord int32_t
server_ord int32_t
hostid int32_t
fsid int32_t
fsgen int32_t
unused uint32_t

magic 0x0001020304050607.

version 37. Clients must match metadata server

version.

wait_flag Set by the client and ignored by the server.

Specifies whether there is a client thread

waiting on the returned message. 1,2 may

have a waiting thread; 3,4 does not have a

waiting thread.

1 WAIT_ONE - try to send for one timeout	interval, reply expected

2 WAIT - try to send forever, reply expected

3 NOTHR - try to send once, reply is not	associated with the originating	thread.

4 NOWAIT - try to send once, no reply.

originator 1 Server

2 Client

command 1 MOUNT - control options

2 LEASE - lease operations

3 NAME – name operations

4 INODE – file operations

5 BLOCK – block data operations

6 WAIT – wait operations

7 CALLOUT – server directed actions/events

8 NOTIFY – notify operations

operation subcommand, defined for each command

length length of body in number of bytes.

out_length length of returned body in number of bytes.

seqno	sequence number, set by the originator.

ack acknowledge number, set by server. Returned	by the client on the next message sent.

error returned error

client_ord	client ordinal, 1..n. The ordinal is 1-1	with the position in the hosts file.

server_ord	server ordinal.

hostid	host identifier

fsid	Initialization time of this filesystem.

fsgen	Generation number of the file system.

fsid + fsgen uniquely identifies this file	system.

unused	reserved for future use.

Body

The message body follows the header. The layout for the 8 major commands is defined for each command.

Mount command - sam_san_mount_t

id sam_id_t (see common structs)
hname upath_t (see common structs)
fs_name uname_t (see common structs)
sock_flags uint32_t
status int32_t
config uint32_t

id	Always zero

hname	Host name of the client.

fs_name	File system name being accessed.

sock_flags	Host socket flags.

status	fi_status bits returned from server (for	mount and resync subcommands)

config	fi_config bits returned from server.

There are 5 MOUNT subcommands which are selected by the sam_san_header_t operation field:

MOUNT_mount – This subcommand is issued by the client to make the connection from the client to the server. It is re-issued if the connection is broken.

MOUNT_config – Sent by the client to instruct the server to send SIGHUP to the sam-sharefsd daemon.

MOUNT_resync – This subcommand is issued by the client to let the server know leases have been reset after failover.

MOUNT_failover – This subcommand is issued by the server to notify the client that a failover is in progress. There is no response from the client.

MOUNT_faildone – Sent to the clients from the new

server to indicate that the failover is now complete.

Lease command

The LEASE command is used for leases, file and record locks, truncate, stage, and open. Note, in the future, the file and record locks, truncate, stage, and open will be split out of the lease command because they are not leases. (They share with leases the ability to wait for other clients' state to change.)

There are 2 LEASE formats, a client request and a server response.

Client request - sam_san_lease_t

id sam_id_t (see common structs)
cl_attr sam_cl_attr_t (see common structs)
data sam_lease_data_t
flock sam_share_flock_t
cred sam_cred_t (see common structs)
leaseinterval uint32_t
gen uint32_t[3]

id	Inode information

cl_attr	file attribues

data	arguments for the lease operation

flock	file locking record (not always used)

cred	credentials

leaseinterval	Client lease expiration interval.

gen	Generation number of leases held

Server response - sam_san_lease2_t

inp sam_san_lease_t
irec sam_ino_record_t (see common structs)

inp	Lease input parameters – see client request

above.

irec	Sequence number of inode instance record.

sam_lease_data_t specifies the lease type:

ltype uint16_t
lflag uchar_t
sparse uchar_t
filemode int32_t
offset int64_t
resid int64_t
alloc_unit uint64_t
cmd int32_t
directio int32_t

ltype type of operation:

0 LTYPE_read – read lease

1 LTYPE_write – write lease

(without appending)

2 LTYPE_append – append lease

3 LTYPE_truncate – truncate the file

4 LTYPE_frlock – file/record locking

5 LTYPE_stage – stage the file

6 LTYPE_open – open the file

7 LTYPE_rmap – memory mapped for read

8 LTYPE_wmap – memory mapped for write

lflag	Flags if truncate operation:

0 TRUNC_truncate – truncate file

1 TRUNC_reduce – truncate excess blocks

2 TRUNC_release – release blocks

3 TRUNC_purge – purge the file

sparse	Set for write lease if blocks must be

allocated because the file is sparse.

offset	64-bit file offset

resid	64-bit file length

alloc_unit	Client-specified byte size to use when	allocating extra blocks for the append lease.

filemode	filemode flags, see file.h

cmd	Used only for LTYPE_frlock. The frlock

command, see fcntl.h

directio	Set if direct I/O is enabled.

sam_share_flock_t in sam_san_lease_t is only used for LTYPE_frlock:

l_type int16_t
l_whence int16_t
unused uint32_t
l_start int64_t
l_len int64_t
l_sysid int32_t
l_pid pid_t (see common structs)

l_type	lock operation type

l_whence	lock base indicator

unused	reserved for future use.

l_start	starting offset from base

l_len	lock length; 0 means up until EOF.

l_sysid	system ID running process holding lock.

l_pid	process ID of process holding lock.

There are 4 LEASE subcommands which are selected by the sam_san_header_t operation field:

LEASE_get – The client requests a lease.

LEASE_remove – The client requests removal of an existing lease. (Note: This is not used for normal lease expiration at present.)

LEASE_reset - The client is reestablishing a lease after failover.

LEASE_relinquish – Allows multiple leases to be removed by specifying a mask.

Name command

There are 2 NAME formats, a client request and a server response. The NAME command applies to an existing parent inode.

Client request – sam_san_name_t

parent_id sam_id_t (see common structs)
arg sam_name_arg_t
cred sam_cred_t (see common structs)
component char[4]
unused uint32_t

parent_id	parent ID

arg	see below (union of subcommand structs)

cred	credentials

component	character string, interpreted by subcommand

unused	reserved for future use.

Server response – sam_san_name2_t

parent_id sam_id_t (see common structs)
new_id sam_id_t (see common structs)
prec sam_ino_instance_t (see common structs)
nrec sam_ino_instance_t (see common structs)

parent_id	Parent ID

new_id	set if new file/directory - returned

prec	parent inode instance

nrec	new inode instance

There are 9 NAME subcommands which are selected by the sam_san_header_t operation field. arg(sam_name_arg_t) in the client request is defined for each subcommand:

NAME_create – sam_name_create_t

Client requests creation of a file.

vattr sam_vattr_t (see common structs)
ex int32_t
mode int32_t
flag int32_t
unused uint32_t

vattr	vnode attributes

ex	exclusive create flags

mode	file mode

flag	large file create flag

unused	reserved for future use

The component field of sam_san_name_t contains the name of the file to be created.

NAME_remove – sam_name_remove_t

Client requests that a file be removed.

id sam_id_t (see common structs)

id	id of file to be removed.

The component field of sam_san_name_t contains the name of the file to be removed.

NAME_mkdir – sam_name_mkdir_t

Client requests a directory create.

vattr sam_vattr_t (see common structs)

vattr	vnode attributes – see common structs

The component field of sam_sam_name_t contains the name of the directory to be created.

NAME_rmdir - sam_name_rmdir_t

Client requests a directory remove.

id sam_id_t (see common structs)

id	id of directory to be removed

The component field of sam_san_name_t contains the name of the directory to be removed.

NAME_link - sam_name_link_t

Client requests a file hard link.

id sam_id_t (see common structs)

id	id of the inode to be linked to

The component field of sam_san_name_t contains the name of the hard link to be created.

NAME_rename - sam_name_rename_t

Client requests a rename.

new_parent_id sam_id_t (see common structs)
oid sam_id_t (see common structs)
nid sam_id_t (see common structs)
osize int32_t
nsize int32_t

new_parent_id	The old parent is in the parent_id field of

sam_san_name_t.

oid	old ID, may be 0.

nid	new ID, may be 0.

osize	number of characters in the old component.

nsize	number of characters in the new component.

This subcommand packs two strings into the component field

of sam_san_name_t. The old name of the file is stored as a MAXNAMELEN character array and is followed by the new name.

NAME_symlink – sam_name_symlink_t

Client requests a symlink.

vattr sam_vattr_t (see common structs)
comp_size int32_t
path_size int32_t

vattr	vnode attributes

comp_size	number of characters in the symbolic link	being created.

path_size	number of characters in the path of the	contents.

This subcommand packs two strings into the component field of sam_san_name_t. The name of the symbolic link being created is stored first as a MAXNAMELEN character array and is followed by the path of the contents of the link.

NAME_acl – sam_name_acl_t

Client requests an acl operation

mask int32_t
aclcnt int32_t
dfaclcnt int32_t
unused uint32_t

mask	ACL mask

aclcnt	number of ACL entries

dfaclcnt	number of default ACL entries

unused	reserved for future use

The component field of sam_san_name_t contains the ACL entries in the format used by Solaris. (sys/acl.h)

NAME_lookup

Client request to lookup a name.

The component field of sam_san_name_t contains the name of the file to be searched for.

Inode command

There are 2 INODE formats, a client request and a server response. The INODE command applies to an existing inode.

Client request - sam_san_inode_t

id sam_id_t (see common structs)
cl_attr sam_cl_attr_t (see common structs)
arg sam_inode_arg_t
cred sam_cred_t (see common structs)

id	file id.

cl_attr	file attributes

arg	see below (union of subcommand structs)

cred	credentials

Server response - sam_san_inode2_t

inp sam_id_t (see common structs)
irec sam_ino_record_t (see common structs)

inp	request inode ID

irec	inode information record

There are 11 INODE subcommands selected by the sam_san_header_t operation field. arg(sam_inode_arg_t) in the client request is defined for all subcommands with the exception of these 4:

INODE_getino – Client requests inode information.

INODE_fsync_wait - Client requests inode sync with wait.

INODE_fsync_nowait - Client requests inode sync with nowait.

INODE_close – Client last close of this inode.

INODE_setattr – sam_inode_setattr_t

Client requests a setattr operation.

vattr sam_vattr_t (see common structs)
flags uint_t
unused uint32_t

vattr	vnode attributes. returned updated. see common	structs.

flags	utime flags

unused	reserved for future use

INODE_stage - sam_inode_stage_t

Client requests to stage a file.

copy uchar_t
unused uchar_t
unused1 uint16_t
unused2 uint32_t

copy	Archive copy number (1-4) to start search.

unused	reserved for future use

unused1	reserved for future use

unused2	reserved for future use

INODE_samattr – sam_inode_samattr_t

Client requests a SAM user command operation.

cmd int32_t
unused uint32_t
ops char[128]

cmd

4	SC_archive – archive command

5	SC_release - release command

6	SC_stage - stage command

7	SC_ssum - checksum command

11	SC_setfa – set file attributes command

13	SC_cancelstage – cancels stage request

16	SC_segment – segment command

unused	reserved for future use

ops	options and arguments specific to each command.	See each command's man pages for a full	description.

INODE_samarch – sam_inode_samarch_t

Client requests a SAM system adminiatrator archive command.

operation int32_t
flags uint16_t
media uint16_t
copies uchar_t
ncopies uchar_t
dcopy uchar_t
unused uchar_t
unused1 uint32_t
vsn vsn_t (see common structs)

operation

1	OP_unarchive – unarchive archive copy(s)

2	OP_damage – damage archive copy(s)

3	OP_undamage – undamage archive copy(s)

4	OP_rearch – rearchive an archive copy(s)

5	OP_unrearch – unrearchive archive copy(s)

6	OP_exarchive – exchange two archive copy(s)

flags	Action flags

media	If non-zero, the media to affect

copies	Bit mask for copies to affect

ncopies	Number of copies

dcopy	2nd copy for OP_exarchive

unused	reserved for future use

unused1	reserved for future use

vsn	If non-zero, the VSN to affect

Block command - sam_san_block_t

There are 2 BLOCK formats, a client request and a server response. The BLOCK command applies to an existing inode if I-number is non-zero. Both formats use the sam_san_block_t data structure with only the server filling in the return data information.

Client request

id sam_id_t (see common structs)
arg sam_block_arg_t
data char[4]
unused uint32_t

id	file id (1 if getbuf)

arg	see below (union of subcommand structs)

data	unused for the client request

unused	reserved for future use.

Server response

id sam_id_t (see common structs)
arg sam_block_arg_t
data char[4]
unused uint32_t

id	file id (1 if getbuf)

arg	see below (union of subcommand structs)

data	returned data as described below (size may vary)

unused	reserved for future use

There are 9 BLOCK subcommands which are selected by the sam_san_header_t operation field. arg(sam_block_arg_t) in the client request is defined for each subcommand:

BLOCK_getbuf – sam_block_getbuf_t

Get a buffer cache buffer.

ord int32_t
blkno uint32_t
bsize int64_t
addr int64_t

ord	file system ordinal

blkno	block number

bsize	block size

addr	address (in client's address space)

data in the server response is returned containing bsize bytes of the contents of the buffer cache buffer's data.

BLOCK_fgetbuf – sam_block_fgetbuf_t

Get a file page.

offset int64_t
bp int64_t
len int32_t
ino int32_t

offset	file offset

bp	buffer pointer address (in the client's address	space - received and resent by the server	untouched)

len	block size

ino	inode owner of page

data in the server response is returned containing len bytes of the contents of the page cache page's data.

BLOCK_getino – sam_block_getino_t

Get inode information.

id sam_id_t (see common structs)
bsize int64_t
addr int64_t

id	inode/generation number

bsize	block size (sizeof sam_disk_inode_t)

addr	address (in client's address space)

data in the server response is returned containing a sam_disk_inode_t for id.

BLOCK_getsblk – sam_block_sblk_t

Get the superblock.

bsize int64_t
addr int64_t

bsize	block size (sizeof sam_sblk_t)

addr	address (in client's address space)

data in the server response is returned containing a sam_sblk_t superblock.

BLOCK_vfsstat – sam_block_vfsstat_t

Get filesystem information for df.

capacity int64_t
space int64_t
mm_capacity int64_t
mm_space int64_t
unused uint64_t

capacity	total number of blocks in family set.

space	total number of free blocks in family set.

mm_capacity	total number of blocks in metadata space.

mm_space	total number of free metadata space blocks.

unused	reserved for future use

data in the server response is not set. capacity, space, mm_capacity and mm_space return the values.

BLOCK_wakeup - no type

Wakeup all waiting clients.

Signals that the current WRITE/APPEND owner of id in the client request has flushed all of id's pages and has switched to directio. Wakeup all waiting clients.

arg in the client request is not defined.

data in the server response is not set.

BLOCK_panic - no type

Panic the system.

Causes the server to panic. There is obviously no server response.

arg in the client request is not defined.

BLOCK_quota – sam_block_quota_t

Get filesystem quota information.

operation int32_t
type int32_t
index int32_t
len int32_t
buf int64_t

operation

1	SAM_QOP_QSTAT - non-privledged; return	active quotas of filesystem.

2	SAM_QOP_GET - non-prevledged; return quota	record of the active filesystem.

3	SAM_QOP_PUT - privledged; write quota record	to active filesystem.

4	SAM_QOP_PUTALL - privledged; write quota	records to active filesystem.

type

0	SAM_QUOTA_ADMIN - admin set quotas

1	SAM_QUOTA_GROUP - group quotas

2	SAM_QUOTA_USER - user quotas

index	UID, GID or Admin ID.

len	buffer len (sizeof sam_dquot_t)

buf	quota record buffer address (in client's address	space)

data in the server response contains a sam_dquot_t entry for operation, type and index.

Callout command - sam_san_callout_t

The CALLOUT command is issued by the server to notify the client of an event.

id sam_id_t (see common structs)
arg sam_callout_arg_t
irec sam_ino_record_t (see common structs)

id	file id

arg	see below (union of subcommand structs)

irec	inode instance record

There are 5 CALLOUT subcommands which are selected by the sam_san_header_t operation field. arg(sam_callout_arg_t) in the client request is defined for all subcommands with the exception of these 3:

CALLOUT_action – the server notifies the client to perform a server directed action. The actions are specified in irec.

CALLOUT_acl – the server notifies the client to refresh acls.

CALLOUT_directio - the server notifies the client that directio I/O has been enabled on id.

CALLOUT_stage - sam_callout_stage_t

The server notifes the client of the current state of the staging process.

copy uchar_t
copy_mask uchar_t
unused uint16_t
flags uint32_t
error int32_t
unused1 uint32_t

copy	archive copy number (1..4)

copy_mask	stage mask

unused	reserved for future use

flags	inode flag bits

error	stage errno

unused1	reserved for future use

CALLOUT_lease – san_callout_relinquish_lease_t

The server notifies the client to reissue the lease command.

lease_mask uint16_t
timeo uint32_t

lease_mask	Lease mask for relinquish.

timeo	Lease time out.

Notify command - sam_san_notify_t

The NOTIFY command is issued by the server to notify the client of an event. It does not transport an irec like the CALLOUT command.

id sam_id_t (see common structs)
arg sam_notify_arg_t

id	file id

arg	see below (union of subcommand structs)

There are 3 NOTIFY subcommands which are selected by the sam_san_header_t operation field. arg(sam_notify_arg_t) in the client request is defined for all subcommands with the exception of this one:

NOTIFY_lease - The server notifies the client that the lease that the client is waiting on is now available.

NOTIFY_lease_expire – sam_notify_lease_t

The server notifies the client of that the lease(s) are now expired.

lease_mask uint32_t
unused uint32_t

lease_mask	Mask of leases being expired.

unused	reserved for future use

NOTIFY_dnlc – san_notify_dnlc_t

The server notifies the client that the specified component is now stale in the DNLC.

component char[256]

component	Entry in the DNLC that is stale.

Common Structs

upath_t	char[128]

uname_t	char[32]

pid_t	int32_t

vsn_t	char[32] (null terminated)

sam_ino_t	uint32_t

uid_t	int32_t

gid_t	uid_t

mode_t	uint32_t

nlink_t	uint32_t

sam_time_t int32_t

media_t	uint16_t

sam_bn_t	uint32_t

offset_t	int64_t

sam_timestruc_t

Used to pass the time vs. kill it.

tv_sec int32_t
tv_nsec int32_t

tv_sec	seconds

tv_nsec	nanoseconds

rm_status_t

Removable media file status flags.

union
flags uint16_t
extent_flags uint16_t

flags	removable media file status flags

extent_flags	extent flags for direct extents

sam_rm_t

Removable file information structure.

size offset_t
media media_t
ui rm_status_t
union
rm
file_offset uint32_t
mau uint32_t
position uint32_t
dk
allocahead uint32_t
seg_size uint32_t
union
fsize int32_t
ord uint32_t

size	size of file

media	media type

ui	extent flags or removable media flag	bits.

rm

file_offset	file starting byte offset

mau	media allocation unit

position	position of file

dk

allocahead	allocahead size

seg_size	segment size in megabytes

fsize	segment index data size - seg_file only

ord	segment ordinal - seg_ino only

sam_id_t

Used to pass the unique file handle.

ino sam_ino_t
gen int32_t

ino	The Inode number

gen	Generation number of the Inode (gets incremented	when the file is deleted and the Inode reused.

sam_ino_instance_t

Used to identify the chronological order of the inode information.

seqno uint32_t
ino_gen uint32_t
srvr_ord uint32_t
unused uint32_t

seqno	Inode sequence number

ino_gen	Unique number which matches this Inode	instance.

srvr_ord	Server ordinal.

unused	reserved for future use

ino_status_t

Used to communicate inode status information.

bitfield uint32_t
acl :1
dfacl :1
stripe_group :1
stripe_width :1
archive_a :1
seg_file :1
seg_ino :1
worm_rdonly :1
worm_attr :1
inconsistent_archive :1
directio :1
concurrent_archive :1
direct_map :1
stage_failed :1
segment :1
meta :1
offline :1
pextents :1
archnodrop :1
archdone :1
on_large :1
cs_gen :1
cs_use :1
cs_val :1
stage_all :1
noarch :1
bof_online :1
damaged :1
direct :1
nodrop :1
release :1
remedia :1

acl	access control list

dfacl	default ACL also (directories only)

stripe_group	setfa -g attribute set

stripe_width	setfa -s attribute set

archive_a	bit position - used by the public	interface.

seg_file	segment file index

seg_ino	segment data inode

worm_rdonly	Write-Once-Read-Many (WORM) enabled

worm_attr	WORM attribute

inconsistent_archive	mark archive copy even if	inconsistent.

directio	directio attribute

concurrent_archive	archive when file is opened for	write.

direct_map	use direct-map extents	(preallocated space)

stage_failed	stage failed flag

segment	segment access attribute

meta	file is allocated on meta device(s)

offline	file is offline

pextents	partial extents on-line

archnodrop	no drop controlled by archiver

archdone	file has all required archiving	done.

on_large	small extents on large block

cs_gen	generate checksum

cs_use	use checksum

cs_val	valid checksum exists

stage_all	“stage all” is enabled

noarch	“no archive” is enabled

bof_online	“beginning of file left on-line”	is enabled

damaged	file is damaged

direct	file is direct access

nodrop	“no drop” is enabled

release	release after archive

remedia	removable media

ino_st_t

Union to hold Inode status flag information.

union
b ino_status_t
bits uint32_t

b	flag structure

bits	all flags at once

sam_cred_t

Used to pass file credentials.

cr_ref uint32_t
cr_uid uid_t
cr_gid gid_t
cr_ruid uid_t
cr_rgid gid_t
cr_suid uid_t
cr_sgid gid_t
cr_ngroups uint32_t
cr_groups gid_t[16]

cr_ref	reference count

cr_uid	effective user id

cr_gid	effective group id

cr_ruid	real user id

cr_rgid	real group id

cr_suid	“saved” user id (from exec)

cr_sgid	“saved” group id (from exec)

cr_ngroups	number of groups in cr_groups

cr_groups	supplementary group list

sam_vattr_t

Used to pass shared file attributes.

va_rsize uint64_t
va_csize uint64_t
va_stage_size uint64_t
va_nblocks uint64_t
va_mode mode_t
va_uid uid_t
va_gid gid_t
va_nlink nlink_t
va_atime sam_timestruc_t
va_mtime sam_timestruc_t
va_ctime sam_timestruc_t
va_mask uint32_t
va_type uint32_t
va_status uint32_t
unused uint32_t

va_rsize	real file size (all sizes in bytes)

va_csize	current file size

va_stage_size	valid staged file size

va_nblocks	number of 512-byte blocks allocated.

va_mode	file access mode (see stat.h)

va_uid	user ID

va_gid	group ID

va_nlink	number of references to file

va_atime	time of last access to the file

va_mtime	time of last file modification

va_ctime	creation time of the file

va_mask	bit mask of attributes

va_type	vnode type (for create)

va_status	Inode status attributes

unused	reserved for future use

sam_sr_attr_t

Server Inode information record. Set on the server and returned to the client.

actions uint16_t
size_owner uint32_t
current_size uint64_t
stage_size uint64_t
alloc_size uint64_t
offset uint64_t

actions	Server-directed action flags (same as	client-directed actions below in	sam_cr_attr_t)

0x0001	SR_STALE_INDIRECT - Stale indirect blocks on	client only.

0x0002	SR_DIRECTIO_ON - Change I/O to direct.

0x0004	SR_SYNC_PAGES - Sync. pages.

0x0008	SR_INVAL_PAGES - Sync. and invalidate pages.

0x0010	SR_WAIT_LEASE - Wait on lease	expiration/cancellation.

0x0020	SR_WAIT_FRLOCK - Wait on frlock.

0x0040	SR_SET_SIZE - Set size on the server.

0x0080	SR_NOTIFY_FRLOCK - Notify frlock waiting on	this client.

0x0100	SR_FORCE_SIZE - Force size to inode size.

size_owner	Ordinal of client setting fiele size.

current_size	current file size (in bytes of course)

stage_size	stage file size

alloc_size	allocated size

offset	stale indirect blocks offset

sam_cl_attr_t

Client shared file attributes. Updated on the server.

seqno uint32_t
actions uint16_t
iflags uint32_t
unused uint32_t
real_size uint64_t

seqno	Client attribute sequence number.

actions	Client-directed action flags. Same as	Server-directed actions described by actions	in sam_sr_attr_t above.

iflags	Incore inode flag bits.

unused	reserved for future use

real_size	Real file size

sam_psize_t

Partial size information.

union
symlink uint32_t
rmfile uint32_t
partial uint32_t
rdev uint32_t

symlink	number of characters in the symlink

rmfile	removable media size

partial	partial kilobyte size

rdev	if BLK or CHR, the real device

sam_disk_inode_t

The SAM Inode structure as it appears on disk.

mode mode_t
version int32_t
id sam_id_t
parent_id sam_id_t
rm sam_rm_t
ext_id sam_id_t
uid uid_t
gid gid_t
admin_id int32_t
nlink nlink_t
status ino_st_t
access_time sam_timestruc_t
modify_time sam_timestruc_t
change_time sam_timestruc_t
creation_time sam_time_t
attribute_time sam_time_t
unit uchar_t
cs_algo uchar_t
arch_status uchar_t
lextent uchar_t
ar_flags uchar_t[4]
stripe char
stride char
media media_t[4]
stripe_group uchar_t
ext_attrs uchar_t
psize sam_psize_t
blocks int32_t
residence_time sam_time_t
free_ino int32_t
extent sam_bn_t[19]
extent_ord uchar_t[19]
stage_ahead uchar_t

mode	mode and type of file

version	version number of the Inode layout.

id	unique ID (Inode number and generation)

parent_id	Inode number of the parent directory.

rm	removable file information

ext_id	Inode number of extension.

uid	owner's user ID

gid	owner's group ID

admin_id	admin ID

nlink	number of links to the file

status	inode status

access_time	time file was last accessed

modify_time	time file data was last modified

change_time	time the inode was last modified

attribute_time	time the file attributes last changed

unit	next stripe unit

cs_algo	which checksum algorithm is in effect

arch_status	archive status

lextent	length of extent array

ar_flags	SAM archive flags

stripe	stripe stride width

stride	current number of stripes

media	archive media residency

stripe_group	stripe group unit

ext_attrs	inode extension types present

psize	partial size information union

blocks	count of allocated blocks

residence_time	the time the file changed residence

free_ino	next free inode

extent	array of extents

extent_ord	device ord for each extent

stage_ahead	stage readahead

sam_ino_record_t

Server Inode information record. Set on the server and returned to the client.

in sam_ino_instance_t
sr_attr sam_sr_attr_t
di sam_disk_inode_t

in	Inode instance

sr_attr	Inode attributes

di	Inode (returned from server)

QFS Shared File System Protocol -- Sun Proprietary/Confidential	1

QFS Shared Filesystem Protocol

Harriet Coverston

2003-01-02T01:20:00