Lines Matching defs:host
23 * attribute, the host inode number, and the extended attribute inode number.
70 * @host: host inode
76 * and value @value for inode @host. The host inode is also updated on flash
81 static int create_xattr(struct ubifs_info *c, struct inode *host,
86 struct ubifs_inode *ui, *host_ui = ubifs_inode(host);
93 host->i_ino, host_ui->xattr_cnt);
105 host->i_ino, names_len, XATTR_LIST_MAX);
113 inode = ubifs_new_inode(c, host, S_IFREG | S_IRWXUGO);
137 host->i_ctime = current_time(host);
145 * have to set the UBIFS_CRYPT_FL flag on the host inode.
152 err = ubifs_jnl_update(c, host, nm, inode, 0, 1);
155 ubifs_set_inode_flags(host);
181 * @host: host inode
190 static int change_xattr(struct ubifs_info *c, struct inode *host,
194 struct ubifs_inode *host_ui = ubifs_inode(host);
218 host->i_ctime = current_time(host);
223 * It is important to write the host inode after the xattr inode
224 * because if the host inode gets synchronized (via 'fsync()'), then
226 * before the host inode in the write-buffer.
228 err = ubifs_jnl_change_xattr(c, inode, host);
263 int ubifs_xattr_set(struct inode *host, const char *name, const void *value,
267 struct ubifs_info *c = host->i_sb->s_fs_info;
274 ubifs_assert(c, inode_is_locked(host));
286 down_write(&ubifs_inode(host)->xattr_sem);
291 xent_key_init(c, &key, host->i_ino, &nm);
301 err = create_xattr(c, host, &nm, value, size);
317 err = change_xattr(c, host, inode, value, size);
321 up_write(&ubifs_inode(host)->xattr_sem);
326 ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf,
330 struct ubifs_info *c = host->i_sb->s_fs_info;
344 down_read(&ubifs_inode(host)->xattr_sem);
345 xent_key_init(c, &key, host->i_ino, &nm);
361 ubifs_assert(c, ubifs_inode(host)->xattr_size > ui->data_len);
377 up_read(&ubifs_inode(host)->xattr_sem);
399 struct inode *host = d_inode(dentry);
400 struct ubifs_info *c = host->i_sb->s_fs_info;
401 struct ubifs_inode *host_ui = ubifs_inode(host);
406 dbg_gen("ino %lu ('%pd'), buffer size %zd", host->i_ino,
425 lowest_xent_key(c, &key, host->i_ino);
461 static int remove_xattr(struct ubifs_info *c, struct inode *host,
465 struct ubifs_inode *host_ui = ubifs_inode(host);
477 host->i_ctime = current_time(host);
483 err = ubifs_jnl_delete_xattr(c, host, inode, nm);
502 int ubifs_purge_xattrs(struct inode *host)
505 struct ubifs_info *c = host->i_sb->s_fs_info;
511 if (ubifs_inode(host)->xattr_cnt <= ubifs_xattr_max_cnt(c))
515 host->i_ino);
517 down_write(&ubifs_inode(host)->xattr_sem);
518 lowest_xent_key(c, &key, host->i_ino);
543 err = remove_xattr(c, host, xino, &nm);
559 up_write(&ubifs_inode(host)->xattr_sem);
569 up_write(&ubifs_inode(host)->xattr_sem);
595 static int ubifs_xattr_remove(struct inode *host, const char *name)
598 struct ubifs_info *c = host->i_sb->s_fs_info;
604 ubifs_assert(c, inode_is_locked(host));
613 down_write(&ubifs_inode(host)->xattr_sem);
614 xent_key_init(c, &key, host->i_ino, &nm);
630 err = remove_xattr(c, host, inode, &nm);
638 up_write(&ubifs_inode(host)->xattr_sem);
706 dbg_gen("xattr '%s', host ino %lu ('%pd'), size %zd",