Lines Matching refs:param
50 smb_rw_param_t *param; in smb_pre_write() local
55 param = kmem_zalloc(sizeof (smb_rw_param_t), KM_SLEEP); in smb_pre_write()
56 sr->arg.rw = param; in smb_pre_write()
57 param->rw_magic = SMB_RW_MAGIC; in smb_pre_write()
61 param->rw_count = (uint32_t)count; in smb_pre_write()
62 param->rw_offset = (uint64_t)off; in smb_pre_write()
63 param->rw_vdb.vdb_uio.uio_loffset = (offset_t)param->rw_offset; in smb_pre_write()
81 smb_rw_param_t *param = sr->arg.rw; in smb_com_write() local
92 if (param->rw_count == 0) { in smb_com_write()
93 rc = smb_write_truncate(sr, param); in smb_com_write()
95 rc = smbsr_decode_data(sr, "D", ¶m->rw_vdb); in smb_com_write()
97 if ((rc != 0) || (param->rw_vdb.vdb_len != param->rw_count)) { in smb_com_write()
103 param->rw_vdb.vdb_uio.uio_loffset = (offset_t)param->rw_offset; in smb_com_write()
105 rc = smb_common_write(sr, param); in smb_com_write()
115 (uint16_t)param->rw_count, 0); in smb_com_write()
133 smb_rw_param_t *param; in smb_pre_write_and_close() local
138 param = kmem_zalloc(sizeof (smb_rw_param_t), KM_SLEEP); in smb_pre_write_and_close()
139 sr->arg.rw = param; in smb_pre_write_and_close()
140 param->rw_magic = SMB_RW_MAGIC; in smb_pre_write_and_close()
144 &count, &off, ¶m->rw_last_write); in smb_pre_write_and_close()
147 &count, &off, ¶m->rw_last_write); in smb_pre_write_and_close()
150 param->rw_count = (uint32_t)count; in smb_pre_write_and_close()
151 param->rw_offset = (uint64_t)off; in smb_pre_write_and_close()
169 smb_rw_param_t *param = sr->arg.rw; in smb_com_write_and_close() local
181 if (param->rw_count == 0) { in smb_com_write_and_close()
182 rc = smb_write_truncate(sr, param); in smb_com_write_and_close()
187 rc = smbsr_decode_data(sr, ".#B", param->rw_count, in smb_com_write_and_close()
188 ¶m->rw_vdb); in smb_com_write_and_close()
190 if ((rc != 0) || (param->rw_vdb.vdb_len != param->rw_count)) { in smb_com_write_and_close()
196 param->rw_vdb.vdb_uio.uio_loffset = (offset_t)param->rw_offset; in smb_com_write_and_close()
198 rc = smb_common_write(sr, param); in smb_com_write_and_close()
207 smb_ofile_close(sr->fid_ofile, param->rw_last_write); in smb_com_write_and_close()
209 count = (uint16_t)param->rw_count; in smb_com_write_and_close()
234 smb_rw_param_t *param; in smb_pre_write_and_unlock() local
240 param = kmem_zalloc(sizeof (smb_rw_param_t), KM_SLEEP); in smb_pre_write_and_unlock()
241 sr->arg.rw = param; in smb_pre_write_and_unlock()
242 param->rw_magic = SMB_RW_MAGIC; in smb_pre_write_and_unlock()
246 param->rw_count = (uint32_t)count; in smb_pre_write_and_unlock()
247 param->rw_offset = (uint64_t)off; in smb_pre_write_and_unlock()
265 smb_rw_param_t *param = sr->arg.rw; in smb_com_write_and_unlock() local
283 if (param->rw_count == 0) { in smb_com_write_and_unlock()
289 rc = smbsr_decode_data(sr, "D", ¶m->rw_vdb); in smb_com_write_and_unlock()
291 if ((rc != 0) || (param->rw_count != param->rw_vdb.vdb_len)) { in smb_com_write_and_unlock()
297 param->rw_vdb.vdb_uio.uio_loffset = (offset_t)param->rw_offset; in smb_com_write_and_unlock()
299 if ((rc = smb_common_write(sr, param)) != 0) { in smb_com_write_and_unlock()
309 status = smb_unlock_range(sr, param->rw_offset, in smb_com_write_and_unlock()
310 (uint64_t)param->rw_count, lk_pid); in smb_com_write_and_unlock()
318 (uint16_t)param->rw_count, 0); in smb_com_write_and_unlock()
370 smb_rw_param_t *param; in smb_pre_write_andx() local
378 param = kmem_zalloc(sizeof (smb_rw_param_t), KM_SLEEP); in smb_pre_write_andx()
379 sr->arg.rw = param; in smb_pre_write_andx()
380 param->rw_magic = SMB_RW_MAGIC; in smb_pre_write_andx()
384 &off_low, ¶m->rw_mode, &remcnt, &datalen_high, in smb_pre_write_andx()
385 &datalen_low, ¶m->rw_dsoff, &off_high); in smb_pre_write_andx()
387 if (param->rw_dsoff >= 63) in smb_pre_write_andx()
388 param->rw_dsoff -= 63; in smb_pre_write_andx()
389 param->rw_offset = ((uint64_t)off_high << 32) | off_low; in smb_pre_write_andx()
392 &off_low, ¶m->rw_mode, &remcnt, &datalen_high, in smb_pre_write_andx()
393 &datalen_low, ¶m->rw_dsoff); in smb_pre_write_andx()
395 if (param->rw_dsoff >= 59) in smb_pre_write_andx()
396 param->rw_dsoff -= 59; in smb_pre_write_andx()
397 param->rw_offset = (uint64_t)off_low; in smb_pre_write_andx()
403 param->rw_count = (uint32_t)datalen_low; in smb_pre_write_andx()
412 param->rw_count |= ((uint32_t)datalen_high << 16); in smb_pre_write_andx()
430 smb_rw_param_t *param = sr->arg.rw; in smb_com_write_andx() local
435 ASSERT(param); in smb_com_write_andx()
436 ASSERT(param->rw_magic == SMB_RW_MAGIC); in smb_com_write_andx()
446 if (SMB_WRMODE_IS_STABLE(param->rw_mode) && in smb_com_write_andx()
452 rc = smbsr_decode_data(sr, "#.#B", param->rw_dsoff, param->rw_count, in smb_com_write_andx()
453 ¶m->rw_vdb); in smb_com_write_andx()
455 if ((rc != 0) || (param->rw_vdb.vdb_len != param->rw_count)) { in smb_com_write_andx()
461 param->rw_vdb.vdb_uio.uio_loffset = (offset_t)param->rw_offset; in smb_com_write_andx()
463 if (param->rw_count != 0) { in smb_com_write_andx()
464 if ((rc = smb_common_write(sr, param)) != 0) { in smb_com_write_andx()
472 count_low = param->rw_count & 0xFFFF; in smb_com_write_andx()
473 count_high = (param->rw_count >> 16) & 0xFF; in smb_com_write_andx()
487 smb_common_write(smb_request_t *sr, smb_rw_param_t *param) in smb_common_write() argument
501 rc = smb_lock_range_access(sr, node, param->rw_offset, in smb_common_write()
502 param->rw_count, B_TRUE); in smb_common_write()
510 if (SMB_WRMODE_IS_STABLE(param->rw_mode) || in smb_common_write()
516 ¶m->rw_vdb.vdb_uio, &lcount, stability); in smb_common_write()
519 param->rw_count = lcount; in smb_common_write()
536 param->rw_count = param->rw_vdb.vdb_uio.uio_resid; in smb_common_write()
538 if ((rc = smb_opipe_write(sr, ¶m->rw_vdb.vdb_uio)) != 0) in smb_common_write()
539 param->rw_count = 0; in smb_common_write()
551 ofile->f_seek_pos = param->rw_offset + param->rw_count; in smb_common_write()
568 smb_write_truncate(smb_request_t *sr, smb_rw_param_t *param) in smb_write_truncate() argument
581 status = smb_lock_range_access(sr, node, param->rw_offset, in smb_write_truncate()
582 param->rw_count, B_TRUE); in smb_write_truncate()
594 attr.sa_vattr.va_size = param->rw_offset; in smb_write_truncate()
600 ofile->f_seek_pos = param->rw_offset + param->rw_count; in smb_write_truncate()