Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 415) sorted by relevance

12345678910>>...17

/fs/
Dstatfs.c55 static int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf) in statfs_by_dentry() argument
62 memset(buf, 0, sizeof(*buf)); in statfs_by_dentry()
66 retval = dentry->d_sb->s_op->statfs(dentry, buf); in statfs_by_dentry()
67 if (retval == 0 && buf->f_frsize == 0) in statfs_by_dentry()
68 buf->f_frsize = buf->f_bsize; in statfs_by_dentry()
86 int vfs_statfs(const struct path *path, struct kstatfs *buf) in vfs_statfs() argument
90 error = statfs_by_dentry(path->dentry, buf); in vfs_statfs()
92 buf->f_flags = calculate_f_flags(path->mnt); in vfs_statfs()
128 struct statfs buf; in do_statfs_native() local
130 if (sizeof(buf) == sizeof(*st)) in do_statfs_native()
[all …]
Dreaddir.c146 struct readdir_callback *buf = in fillonedir() local
151 if (buf->result) in fillonedir()
153 buf->result = verify_dirent_name(name, namlen); in fillonedir()
154 if (buf->result < 0) in fillonedir()
155 return buf->result; in fillonedir()
158 buf->result = -EOVERFLOW; in fillonedir()
161 buf->result++; in fillonedir()
162 dirent = buf->dirent; in fillonedir()
176 buf->result = -EFAULT; in fillonedir()
185 struct readdir_callback buf = { in SYSCALL_DEFINE3() local
[all …]
Dseq_file.c101 if (!m->buf) { in traverse()
102 m->buf = seq_buf_alloc(m->size = PAGE_SIZE); in traverse()
103 if (!m->buf) in traverse()
136 kvfree(m->buf); in traverse()
138 m->buf = seq_buf_alloc(m->size <<= 1); in traverse()
139 return !m->buf ? -ENOMEM : -EAGAIN; in traverse()
151 ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos) in seq_read() argument
153 struct iovec iov = { .iov_base = buf, .iov_len = size}; in seq_read()
209 if (!m->buf) { in seq_read_iter()
210 m->buf = seq_buf_alloc(m->size = PAGE_SIZE); in seq_read_iter()
[all …]
/fs/ocfs2/dlm/
Ddlmdebug.c30 static int stringify_lockname(const char *lockname, int locklen, char *buf,
83 char buf[DLM_LOCKID_NAME_MAX]; in __dlm_print_one_lock_resource() local
88 buf, sizeof(buf)); in __dlm_print_one_lock_resource()
90 buf, res->owner, res->state); in __dlm_print_one_lock_resource()
234 static int stringify_lockname(const char *lockname, int locklen, char *buf, in stringify_lockname() argument
245 out += scnprintf(buf + out, len - out, "%.*s%08x", in stringify_lockname()
249 out += scnprintf(buf + out, len - out, "%.*s", in stringify_lockname()
255 char *buf, int len) in stringify_nodemap() argument
261 out += scnprintf(buf + out, len - out, "%d ", i); in stringify_nodemap()
266 static int dump_mle(struct dlm_master_list_entry *mle, char *buf, int len) in dump_mle() argument
[all …]
/fs/ksmbd/
Dasn1.c59 static void encode_asn_tag(char *buf, unsigned int *ofs, char tag, char seq, in encode_asn_tag() argument
68 buf[index++] = tag; in encode_asn_tag()
71 buf[index++] = len; in encode_asn_tag()
73 buf[index++] = 0x80 | hdr_len; in encode_asn_tag()
75 buf[index++] = (len >> (i * 8)) & 0xFF; in encode_asn_tag()
80 buf[index++] = seq; in encode_asn_tag()
83 buf[index++] = len; in encode_asn_tag()
85 buf[index++] = 0x80 | hdr_len; in encode_asn_tag()
87 buf[index++] = (len >> (i * 8)) & 0xFF; in encode_asn_tag()
96 char *buf; in build_spnego_ntlmssp_neg_blob() local
[all …]
Doplock.c1456 struct create_lease_v2 *buf = (struct create_lease_v2 *)rbuf; in create_lease_buf() local
1458 memset(buf, 0, sizeof(struct create_lease_v2)); in create_lease_buf()
1459 memcpy(buf->lcontext.LeaseKey, lease->lease_key, in create_lease_buf()
1461 buf->lcontext.LeaseFlags = lease->flags; in create_lease_buf()
1462 buf->lcontext.Epoch = cpu_to_le16(lease->epoch); in create_lease_buf()
1463 buf->lcontext.LeaseState = lease->state; in create_lease_buf()
1464 memcpy(buf->lcontext.ParentLeaseKey, lease->parent_lease_key, in create_lease_buf()
1466 buf->ccontext.DataOffset = cpu_to_le16(offsetof in create_lease_buf()
1468 buf->ccontext.DataLength = cpu_to_le32(sizeof(struct lease_context_v2)); in create_lease_buf()
1469 buf->ccontext.NameOffset = cpu_to_le16(offsetof in create_lease_buf()
[all …]
/fs/nilfs2/
Dsysfs.c24 struct attribute *attr, char *buf) \
32 return a->show ? a->show(a, nilfs, buf) : 0; \
36 const char *buf, size_t len) \
44 return a->store ? a->store(a, nilfs, buf, len) : 0; \
96 struct nilfs_root *root, char *buf) in nilfs_snapshot_inodes_count_show() argument
98 return snprintf(buf, PAGE_SIZE, "%llu\n", in nilfs_snapshot_inodes_count_show()
104 struct nilfs_root *root, char *buf) in nilfs_snapshot_blocks_count_show() argument
106 return snprintf(buf, PAGE_SIZE, "%llu\n", in nilfs_snapshot_blocks_count_show()
117 struct nilfs_root *root, char *buf) in nilfs_snapshot_README_show() argument
119 return snprintf(buf, PAGE_SIZE, snapshot_readme_str); in nilfs_snapshot_README_show()
[all …]
/fs/xfs/
Dxfs_itable.c36 struct xfs_bulkstat *buf; member
66 struct xfs_bulkstat *buf = bc->buf; in xfs_bulkstat_one_int() local
87 buf->bs_projectid = ip->i_projid; in xfs_bulkstat_one_int()
88 buf->bs_ino = ino; in xfs_bulkstat_one_int()
89 buf->bs_uid = from_kuid(sb_userns, i_uid_into_mnt(mnt_userns, inode)); in xfs_bulkstat_one_int()
90 buf->bs_gid = from_kgid(sb_userns, i_gid_into_mnt(mnt_userns, inode)); in xfs_bulkstat_one_int()
91 buf->bs_size = ip->i_disk_size; in xfs_bulkstat_one_int()
93 buf->bs_nlink = inode->i_nlink; in xfs_bulkstat_one_int()
94 buf->bs_atime = inode->i_atime.tv_sec; in xfs_bulkstat_one_int()
95 buf->bs_atime_nsec = inode->i_atime.tv_nsec; in xfs_bulkstat_one_int()
[all …]
Dxfs_sysfs.c19 ssize_t (*show)(struct kobject *kobject, char *buf);
20 ssize_t (*store)(struct kobject *kobject, const char *buf,
43 char *buf) in xfs_sysfs_object_show() argument
47 return xfs_attr->show ? xfs_attr->show(kobject, buf) : 0; in xfs_sysfs_object_show()
54 const char *buf, in xfs_sysfs_object_store() argument
59 return xfs_attr->store ? xfs_attr->store(kobject, buf, count) : 0; in xfs_sysfs_object_store()
83 const char *buf, in bug_on_assert_store() argument
89 ret = kstrtoint(buf, 0, &val); in bug_on_assert_store()
106 char *buf) in bug_on_assert_show() argument
108 return snprintf(buf, PAGE_SIZE, "%d\n", xfs_globals.bug_on_assert ? 1 : 0); in bug_on_assert_show()
[all …]
/fs/hostfs/
Dhostfs_user.c21 static void stat64_to_hostfs(const struct stat64 *buf, struct hostfs_stat *p) in stat64_to_hostfs() argument
23 p->ino = buf->st_ino; in stat64_to_hostfs()
24 p->mode = buf->st_mode; in stat64_to_hostfs()
25 p->nlink = buf->st_nlink; in stat64_to_hostfs()
26 p->uid = buf->st_uid; in stat64_to_hostfs()
27 p->gid = buf->st_gid; in stat64_to_hostfs()
28 p->size = buf->st_size; in stat64_to_hostfs()
29 p->atime.tv_sec = buf->st_atime; in stat64_to_hostfs()
31 p->ctime.tv_sec = buf->st_ctime; in stat64_to_hostfs()
33 p->mtime.tv_sec = buf->st_mtime; in stat64_to_hostfs()
[all …]
/fs/gfs2/
Dsys.c37 char *buf) in gfs2_attr_show() argument
41 return a->show ? a->show(sdp, buf) : 0; in gfs2_attr_show()
45 const char *buf, size_t len) in gfs2_attr_store() argument
49 return a->store ? a->store(sdp, buf, len) : len; in gfs2_attr_store()
60 static ssize_t id_show(struct gfs2_sbd *sdp, char *buf) in id_show() argument
62 return snprintf(buf, PAGE_SIZE, "%u:%u\n", in id_show()
66 static ssize_t status_show(struct gfs2_sbd *sdp, char *buf) in status_show() argument
71 s = snprintf(buf, PAGE_SIZE, in status_show()
131 static ssize_t fsname_show(struct gfs2_sbd *sdp, char *buf) in fsname_show() argument
133 return snprintf(buf, PAGE_SIZE, "%s\n", sdp->sd_fsname); in fsname_show()
[all …]
/fs/quota/
Dquota_tree.c50 static ssize_t read_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf) in read_blk() argument
54 memset(buf, 0, info->dqi_usable_bs); in read_blk()
55 return sb->s_op->quota_read(sb, info->dqi_type, buf, in read_blk()
59 static ssize_t write_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf) in write_blk() argument
64 ret = sb->s_op->quota_write(sb, info->dqi_type, buf, in write_blk()
106 char *buf = kmalloc(info->dqi_usable_bs, GFP_NOFS); in get_free_dqblk() local
107 struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; in get_free_dqblk()
110 if (!buf) in get_free_dqblk()
114 ret = read_blk(info, blk, buf); in get_free_dqblk()
123 memset(buf, 0, info->dqi_usable_bs); in get_free_dqblk()
[all …]
/fs/nfsd/
Dnfsctl.c65 static ssize_t write_filehandle(struct file *file, char *buf, size_t size);
66 static ssize_t write_unlock_ip(struct file *file, char *buf, size_t size);
67 static ssize_t write_unlock_fs(struct file *file, char *buf, size_t size);
68 static ssize_t write_threads(struct file *file, char *buf, size_t size);
69 static ssize_t write_pool_threads(struct file *file, char *buf, size_t size);
70 static ssize_t write_versions(struct file *file, char *buf, size_t size);
71 static ssize_t write_ports(struct file *file, char *buf, size_t size);
72 static ssize_t write_maxblksize(struct file *file, char *buf, size_t size);
73 static ssize_t write_maxconn(struct file *file, char *buf, size_t size);
75 static ssize_t write_leasetime(struct file *file, char *buf, size_t size);
[all …]
/fs/ext4/
Dhash.c16 static void TEA_transform(__u32 buf[4], __u32 const in[]) in TEA_transform()
19 __u32 b0 = buf[0], b1 = buf[1]; in TEA_transform()
29 buf[0] += b0; in TEA_transform()
30 buf[1] += b1; in TEA_transform()
53 static __u32 half_md4_transform(__u32 buf[4], __u32 const in[8]) in half_md4_transform()
55 __u32 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; in half_md4_transform()
87 buf[0] += a; in half_md4_transform()
88 buf[1] += b; in half_md4_transform()
89 buf[2] += c; in half_md4_transform()
90 buf[3] += d; in half_md4_transform()
[all …]
Dsysfs.c62 static ssize_t session_write_kbytes_show(struct ext4_sb_info *sbi, char *buf) in session_write_kbytes_show() argument
66 return snprintf(buf, PAGE_SIZE, "%lu\n", in session_write_kbytes_show()
71 static ssize_t lifetime_write_kbytes_show(struct ext4_sb_info *sbi, char *buf) in lifetime_write_kbytes_show() argument
75 return snprintf(buf, PAGE_SIZE, "%llu\n", in lifetime_write_kbytes_show()
82 const char *buf, size_t count) in inode_readahead_blks_store() argument
87 ret = kstrtoul(skip_spaces(buf), 0, &t); in inode_readahead_blks_store()
99 const char *buf, size_t count) in reserved_clusters_store() argument
106 ret = kstrtoull(skip_spaces(buf), 0, &val); in reserved_clusters_store()
115 const char *buf, size_t count) in trigger_test_error() argument
122 if (len && buf[len-1] == '\n') in trigger_test_error()
[all …]
/fs/erofs/
Ddecompressor_lzma.c9 struct xz_buf buf; member
196 strm->buf.in = kin + inputmargin; in z_erofs_lzma_decompress()
197 strm->buf.in_pos = 0; in z_erofs_lzma_decompress()
198 strm->buf.in_size = min_t(u32, inlen, PAGE_SIZE - inputmargin); in z_erofs_lzma_decompress()
199 inlen -= strm->buf.in_size; in z_erofs_lzma_decompress()
200 strm->buf.out = NULL; in z_erofs_lzma_decompress()
201 strm->buf.out_pos = 0; in z_erofs_lzma_decompress()
202 strm->buf.out_size = 0; in z_erofs_lzma_decompress()
207 if (strm->buf.out_pos == strm->buf.out_size) { in z_erofs_lzma_decompress()
208 if (strm->buf.out) { in z_erofs_lzma_decompress()
[all …]
/fs/squashfs/
Dxz_wrapper.c26 struct xz_buf buf; member
129 stream->buf.in_pos = 0; in squashfs_xz_uncompress()
130 stream->buf.in_size = 0; in squashfs_xz_uncompress()
131 stream->buf.out_pos = 0; in squashfs_xz_uncompress()
132 stream->buf.out_size = PAGE_SIZE; in squashfs_xz_uncompress()
133 stream->buf.out = squashfs_first_page(output); in squashfs_xz_uncompress()
134 if (IS_ERR(stream->buf.out)) { in squashfs_xz_uncompress()
135 error = PTR_ERR(stream->buf.out); in squashfs_xz_uncompress()
142 if (stream->buf.in_pos == stream->buf.in_size) { in squashfs_xz_uncompress()
155 stream->buf.in = data + offset; in squashfs_xz_uncompress()
[all …]
/fs/ubifs/
Dscan.c28 static int scan_padding_bytes(void *buf, int len) in scan_padding_bytes() argument
31 uint8_t *p = buf; in scan_padding_bytes()
57 int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, in ubifs_scan_a_node() argument
60 struct ubifs_ch *ch = buf; in ubifs_scan_a_node()
71 return scan_padding_bytes(buf, len); in ubifs_scan_a_node()
79 if (ubifs_check_node(c, buf, len, lnum, offs, quiet, 1)) in ubifs_scan_a_node()
83 struct ubifs_pad_node *pad = buf; in ubifs_scan_a_node()
139 sleb->buf = sbuf; in ubifs_start_scan()
182 void *buf, int offs) in ubifs_add_snod() argument
184 struct ubifs_ch *ch = buf; in ubifs_add_snod()
[all …]
Dio.c87 int ubifs_leb_read(const struct ubifs_info *c, int lnum, void *buf, int offs, in ubifs_leb_read() argument
92 err = ubi_read(c->ubi, lnum, buf, offs, len); in ubifs_leb_read()
105 int ubifs_leb_write(struct ubifs_info *c, int lnum, const void *buf, int offs, in ubifs_leb_write() argument
114 err = ubi_leb_write(c->ubi, lnum, buf, offs, len); in ubifs_leb_write()
116 err = dbg_leb_write(c, lnum, buf, offs, len); in ubifs_leb_write()
126 int ubifs_leb_change(struct ubifs_info *c, int lnum, const void *buf, int len) in ubifs_leb_change() argument
134 err = ubi_leb_change(c->ubi, lnum, buf, len); in ubifs_leb_change()
136 err = dbg_leb_change(c, lnum, buf, len); in ubifs_leb_change()
226 int ubifs_check_node(const struct ubifs_info *c, const void *buf, int len, in ubifs_check_node() argument
231 const struct ubifs_ch *ch = buf; in ubifs_check_node()
[all …]
/fs/f2fs/
Dhash.c25 static void TEA_transform(unsigned int buf[4], unsigned int const in[]) in TEA_transform()
28 __u32 b0 = buf[0], b1 = buf[1]; in TEA_transform()
38 buf[0] += b0; in TEA_transform()
39 buf[1] += b1; in TEA_transform()
43 unsigned int *buf, int num) in str2hashbuf() argument
59 *buf++ = val; in str2hashbuf()
65 *buf++ = val; in str2hashbuf()
67 *buf++ = pad; in str2hashbuf()
72 __u32 in[8], buf[4]; in TEA_hash_name() local
75 buf[0] = 0x67452301; in TEA_hash_name()
[all …]
Dsysfs.c56 ssize_t (*show)(struct f2fs_attr *a, struct f2fs_sb_info *sbi, char *buf);
58 const char *buf, size_t len);
65 struct f2fs_sb_info *sbi, char *buf);
96 struct f2fs_sb_info *sbi, char *buf) in dirty_segments_show() argument
98 return sysfs_emit(buf, "%llu\n", in dirty_segments_show()
103 struct f2fs_sb_info *sbi, char *buf) in free_segments_show() argument
105 return sysfs_emit(buf, "%llu\n", in free_segments_show()
110 struct f2fs_sb_info *sbi, char *buf) in ovp_segments_show() argument
112 return sysfs_emit(buf, "%llu\n", in ovp_segments_show()
117 struct f2fs_sb_info *sbi, char *buf) in lifetime_write_kbytes_show() argument
[all …]
/fs/romfs/
Dstorage.c24 void *buf, size_t buflen) in romfs_mtd_read() argument
29 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf); in romfs_mtd_read()
41 u_char buf[16], *p; in romfs_mtd_strnlen() local
48 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strnlen()
51 p = memchr(buf, 0, len); in romfs_mtd_strnlen()
53 return n + (p - buf); in romfs_mtd_strnlen()
69 u_char buf[17]; in romfs_mtd_strcmp() local
75 buf[0] = 0xff; in romfs_mtd_strcmp()
79 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strcmp()
83 if (memcmp(buf, str, len) != 0) in romfs_mtd_strcmp()
[all …]
/fs/nfs/
Dnfs4namespace.c61 char *buf, *p; in nfs4_pathname_string() local
69 p = buf = kmalloc(len + 1, GFP_KERNEL); in nfs4_pathname_string()
70 if (!buf) in nfs4_pathname_string()
82 return buf; in nfs4_pathname_string()
136 char *buf; in nfs4_validate_fspath() local
139 buf = kmalloc(4096, GFP_KERNEL); in nfs4_validate_fspath()
140 if (!buf) in nfs4_validate_fspath()
143 path = nfs4_path(dentry, buf, 4096); in nfs4_validate_fspath()
145 kfree(buf); in nfs4_validate_fspath()
151 kfree(buf); in nfs4_validate_fspath()
[all …]
/fs/btrfs/
Dsysfs.c168 struct kobj_attribute *a, char *buf) in btrfs_feature_attr_show() argument
180 return scnprintf(buf, PAGE_SIZE, "%d\n", val); in btrfs_feature_attr_show()
185 const char *buf, size_t count) in btrfs_feature_attr_store() argument
200 ret = kstrtoul(skip_spaces(buf), 0, &val); in btrfs_feature_attr_store()
334 struct kobj_attribute *ka, char *buf) in rmdir_subvol_show() argument
336 return scnprintf(buf, PAGE_SIZE, "0\n"); in rmdir_subvol_show()
341 struct kobj_attribute *a, char *buf) in supported_checksums_show() argument
351 ret += scnprintf(buf + ret, PAGE_SIZE - ret, "%s%s", in supported_checksums_show()
356 ret += scnprintf(buf + ret, PAGE_SIZE - ret, "\n"); in supported_checksums_show()
362 struct kobj_attribute *ka, char *buf) in send_stream_version_show() argument
[all …]
/fs/cifs/
Dsmb2file.c26 __u32 *oplock, FILE_ALL_INFO *buf) in smb2_open_file() argument
76 if (buf) { in smb2_open_file()
92 move_smb2_info_to_cifs(buf, smb2_data); in smb2_open_file()
108 struct smb2_lock_element *buf, *cur; in smb2_unlock_range() local
128 buf = kcalloc(max_num, sizeof(struct smb2_lock_element), GFP_KERNEL); in smb2_unlock_range()
129 if (!buf) in smb2_unlock_range()
132 cur = buf; in smb2_unlock_range()
169 current->tgid, num, buf); in smb2_unlock_range()
185 cur = buf; in smb2_unlock_range()
193 num, buf); in smb2_unlock_range()
[all …]

12345678910>>...17