} mess_fs_vfs_newnode;
_ASSERT_MSG_SIZE(mess_fs_vfs_newnode);
+typedef struct {
+ uint64_t count;
+ ino_t inode;
+
+ uint8_t data[40];
+} mess_vfs_fs_putnode;
+_ASSERT_MSG_SIZE(mess_vfs_fs_putnode);
+
typedef struct {
ino_t inode;
mess_fs_vfs_lookup m_fs_vfs_lookup;
mess_vfs_fs_mountpoint m_vfs_fs_mountpoint;
mess_vfs_fs_new_driver m_vfs_fs_new_driver;
+ mess_vfs_fs_putnode m_vfs_fs_putnode;
mess_vfs_fs_rdlink m_vfs_fs_rdlink;
mess_fs_vfs_rdlink m_fs_vfs_rdlink;
mess_vfs_fs_readsuper m_vfs_fs_readsuper;
* Release unused pnode.
*/
struct puffs_node *pn;
- int count = fs_m_in.REQ_COUNT;
- pino_t inum = fs_m_in.REQ_INODE_NR;
+ int count = fs_m_in.m_vfs_fs_putnode.count;
+ ino_t inum = fs_m_in.m_vfs_fs_putnode.inode;
if ((pn = puffs_pn_nodewalk(global_pu, 0, &inum)) == NULL) {
/* XXX Probably removed from the list, see puffs_pn_remove() */
struct inode *ino;
int count;
- if ((ino = find_inode(m_in.REQ_INODE_NR)) == NULL)
+ if ((ino = find_inode(m_in.m_vfs_fs_putnode.inode)) == NULL)
return EINVAL;
- count = m_in.REQ_COUNT;
+ count = m_in.m_vfs_fs_putnode.count;
if (count <= 0 || count > ino->i_ref) return EINVAL;
struct inode *node;
/* Get the inode specified by its number. */
- if ((node = find_inode(fs_m_in.REQ_INODE_NR)) == NULL)
+ if ((node = find_inode(fs_m_in.m_vfs_fs_putnode.inode)) == NULL)
return EINVAL;
/* Decrease the reference count. */
- node->i_count -= fs_m_in.REQ_COUNT - 1;
+ node->i_count -= fs_m_in.m_vfs_fs_putnode.count - 1;
assert(node->i_count > 0);
struct inode *rip;
int count;
- rip = find_inode(fs_dev, (pino_t) fs_m_in.REQ_INODE_NR);
+ rip = find_inode(fs_dev, fs_m_in.m_vfs_fs_putnode.inode);
if (!rip) {
- printf("%s:%d put_inode: inode #%u dev: %llx not found\n", __FILE__,
- __LINE__, (pino_t) fs_m_in.REQ_INODE_NR, fs_dev);
+ printf("%s:%d put_inode: inode #%llu dev: %llx not found\n", __FILE__,
+ __LINE__, fs_m_in.m_vfs_fs_putnode.inode, fs_dev);
panic("fs_putnode failed");
}
- count = fs_m_in.REQ_COUNT;
+ count = fs_m_in.m_vfs_fs_putnode.count;
if (count <= 0) {
printf("%s:%d put_inode: bad value for count: %d\n", __FILE__,
__LINE__, count);
int count;
struct dir_record *dir = NULL;
- dir = get_dir_record(fs_m_in.REQ_INODE_NR);
+ dir = get_dir_record(fs_m_in.m_vfs_fs_putnode.inode);
release_dir_record(dir);
- count = fs_m_in.REQ_COUNT;
+ count = fs_m_in.m_vfs_fs_putnode.count;
if (count <= 0) return(EINVAL);
struct inode *rip;
int count;
- rip = find_inode(fs_dev, (pino_t) fs_m_in.REQ_INODE_NR);
+ rip = find_inode(fs_dev, fs_m_in.m_vfs_fs_putnode.inode);
if(!rip) {
- printf("%s:%d put_inode: inode #%u dev: %llx not found\n", __FILE__,
- __LINE__, (pino_t) fs_m_in.REQ_INODE_NR, fs_dev);
+ printf("%s:%d put_inode: inode #%llu dev: %llx not found\n", __FILE__,
+ __LINE__, fs_m_in.m_vfs_fs_putnode.inode, fs_dev);
panic("fs_putnode failed");
}
- count = fs_m_in.REQ_COUNT;
+ count = fs_m_in.m_vfs_fs_putnode.count;
if (count <= 0) {
printf("%s:%d put_inode: bad value for count: %d\n", __FILE__,
__LINE__, count);
struct inode *rip;
int count;
dev_t dev;
- pino_t inum;
+ ino_t inum;
- rip = find_inode( (pino_t) fs_m_in->REQ_INODE_NR);
+ rip = find_inode(fs_m_in->m_vfs_fs_putnode.inode);
if(!rip) {
- printf("%s:%d put_inode: inode #%ld dev: %llx not found\n", __FILE__,
- __LINE__, fs_m_in->REQ_INODE_NR, fs_m_in->REQ_DEV);
+ printf("%s:%d put_inode: inode #%ld not found\n", __FILE__,
+ __LINE__, fs_m_in->m_vfs_fs_putnode.inode);
panic("fs_putnode failed");
}
- count = fs_m_in->REQ_COUNT;
+ count = fs_m_in->m_vfs_fs_putnode.count;
if (count <= 0) {
printf("%s:%d put_inode: bad value for count: %d\n", __FILE__,
__LINE__, count);
/* Fill in request message */
m.m_type = REQ_PUTNODE;
- m.REQ_INODE_NR = (pino_t) inode_nr;
- m.REQ_COUNT = count;
+ m.m_vfs_fs_putnode.inode = inode_nr;
+ m.m_vfs_fs_putnode.count = count;
/* Send/rec request */
return fs_sendrec(fs_e, &m);