Lines Matching refs:req
614 const struct fuse_in_header *hdr, const struct fuse_forget_in *req) in handle_forget() argument
620 DLOG(INFO) << "[" << handler->token << "] FORGET #" << req->nlookup in handle_forget()
624 __u64 n = req->nlookup; in handle_forget()
635 const struct fuse_in_header *hdr, const struct fuse_getattr_in *req) in handle_getattr() argument
642 DLOG(INFO) << "[" << handler->token << "] GETATTR flags=" << req->getattr_flags in handle_getattr()
643 << " fh=" << std::hex << req->fh << " @ " << hdr->nodeid << std::dec in handle_getattr()
658 const struct fuse_in_header *hdr, const struct fuse_setattr_in *req) in handle_setattr() argument
666 DLOG(INFO) << "[" << handler->token << "] SETATTR fh=" << std::hex << req->fh in handle_setattr()
667 << " valid=" << std::hex << req->valid << " @ " << hdr->nodeid << std::dec in handle_setattr()
675 if (!(req->valid & FATTR_FH) && in handle_setattr()
683 if ((req->valid & FATTR_SIZE) && TEMP_FAILURE_RETRY(truncate64(path, req->size)) == -1) { in handle_setattr()
693 if (req->valid & (FATTR_ATIME | FATTR_MTIME)) { in handle_setattr()
696 if (req->valid & FATTR_ATIME) { in handle_setattr()
697 if (req->valid & FATTR_ATIME_NOW) { in handle_setattr()
700 times[0].tv_sec = req->atime; in handle_setattr()
701 times[0].tv_nsec = req->atimensec; in handle_setattr()
704 if (req->valid & FATTR_MTIME) { in handle_setattr()
705 if (req->valid & FATTR_MTIME_NOW) { in handle_setattr()
708 times[1].tv_sec = req->mtime; in handle_setattr()
709 times[1].tv_nsec = req->mtimensec; in handle_setattr()
722 const struct fuse_in_header* hdr, const struct fuse_mknod_in* req, const char* name) in handle_mknod() argument
732 DLOG(INFO) << "[" << handler->token << "] MKNOD " << name << " 0" << std::oct << req->mode in handle_mknod()
744 __u32 mode = (req->mode & (~0777)) | 0664; in handle_mknod()
745 if (mknod(child_path, mode, req->rdev) == -1) { in handle_mknod()
752 const struct fuse_in_header* hdr, const struct fuse_mkdir_in* req, const char* name) in handle_mkdir() argument
762 DLOG(INFO) << "[" << handler->token << "] MKDIR " << name << " 0" << std::oct << req->mode in handle_mkdir()
774 __u32 mode = (req->mode & (~0777)) | 0775; in handle_mkdir()
901 const struct fuse_in_header* hdr, const struct fuse_rename_in* req, in handle_rename() argument
918 new_parent_node = lookup_node_and_path_by_id_locked(fuse, req->newdir, in handle_rename()
923 << std::hex << req->newdir in handle_rename()
996 const struct fuse_in_header* hdr, const struct fuse_open_in* req) in handle_open() argument
1005 DLOG(INFO) << "[" << handler->token << "] OPEN 0" << std::oct << req->flags in handle_open()
1014 open_flags_to_access_mode(req->flags))) { in handle_open()
1022 h->fd = TEMP_FAILURE_RETRY(open(path, req->flags)); in handle_open()
1034 const struct fuse_in_header* hdr, const struct fuse_read_in* req) in handle_read() argument
1036 struct handle *h = static_cast<struct handle*>(id_to_ptr(req->fh)); in handle_read()
1038 __u32 size = req->size; in handle_read()
1039 __u64 offset = req->offset; in handle_read()
1061 const struct fuse_in_header* hdr, const struct fuse_write_in* req, in handle_write() argument
1065 struct handle *h = static_cast<struct handle*>(id_to_ptr(req->fh)); in handle_write()
1067 __u8 aligned_buffer[req->size] __attribute__((__aligned__(PAGE_SIZE))); in handle_write()
1069 if (req->flags & O_DIRECT) { in handle_write()
1070 memcpy(aligned_buffer, buffer, req->size); in handle_write()
1075 << "(" << h->fd << ") " << req->size << "@" << req->offset; in handle_write()
1076 res = TEMP_FAILURE_RETRY(pwrite64(h->fd, buffer, req->size, req->offset)); in handle_write()
1118 const struct fuse_in_header* hdr, const struct fuse_release_in* req) in handle_release() argument
1120 struct handle *h = static_cast<struct handle*>(id_to_ptr(req->fh)); in handle_release()
1130 const struct fuse_in_header* hdr, const struct fuse_fsync_in* req) in handle_fsync() argument
1133 bool is_data_sync = req->fsync_flags & 1; in handle_fsync()
1137 struct dirhandle *dh = static_cast<struct dirhandle*>(id_to_ptr(req->fh)); in handle_fsync()
1140 struct handle *h = static_cast<struct handle*>(id_to_ptr(req->fh)); in handle_fsync()
1145 << std::hex << req->fh << std::dec << "(" << fd << ") is_data_sync=" << is_data_sync; in handle_fsync()
1161 const struct fuse_in_header* hdr, const struct fuse_open_in* req) in handle_opendir() argument
1197 const struct fuse_in_header* hdr, const struct fuse_read_in* req) in handle_readdir() argument
1202 struct dirhandle *h = static_cast<struct dirhandle*>(id_to_ptr(req->fh)); in handle_readdir()
1205 if (req->offset == 0) { in handle_readdir()
1216 fde->off = req->offset + 1; in handle_readdir()
1226 const struct fuse_in_header* hdr, const struct fuse_release_in* req) in handle_releasedir() argument
1228 struct dirhandle *h = static_cast<struct dirhandle*>(id_to_ptr(req->fh)); in handle_releasedir()
1237 const struct fuse_in_header* hdr, const struct fuse_init_in* req) in handle_init() argument
1242 DLOG(INFO) << "[" << handler->token << "] INIT ver=" << req->major << "." << req->minor in handle_init()
1243 << " maxread=" << req->max_readahead << " flags=" << std::hex << req->flags; in handle_init()
1250 if (req->major != FUSE_KERNEL_VERSION || req->minor < 6) { in handle_init()
1252 << req->major << "." << req->minor in handle_init()
1258 out.minor = MIN(req->minor, 15); in handle_init()
1269 out.max_readahead = req->max_readahead; in handle_init()
1316 const struct fuse_forget_in *req = static_cast<const struct fuse_forget_in*>(data); in handle_fuse_request() local
1317 return handle_forget(fuse, handler, hdr, req); in handle_fuse_request()
1321 const struct fuse_getattr_in *req = static_cast<const struct fuse_getattr_in*>(data); in handle_fuse_request() local
1322 return handle_getattr(fuse, handler, hdr, req); in handle_fuse_request()
1326 const struct fuse_setattr_in *req = static_cast<const struct fuse_setattr_in*>(data); in handle_fuse_request() local
1327 return handle_setattr(fuse, handler, hdr, req); in handle_fuse_request()
1333 const struct fuse_mknod_in *req = static_cast<const struct fuse_mknod_in*>(data); in handle_fuse_request() local
1334 const char *name = ((const char*) data) + sizeof(*req); in handle_fuse_request()
1335 return handle_mknod(fuse, handler, hdr, req, name); in handle_fuse_request()
1339 const struct fuse_mkdir_in *req = static_cast<const struct fuse_mkdir_in*>(data); in handle_fuse_request() local
1340 const char *name = ((const char*) data) + sizeof(*req); in handle_fuse_request()
1341 return handle_mkdir(fuse, handler, hdr, req, name); in handle_fuse_request()
1355 const struct fuse_rename_in *req = static_cast<const struct fuse_rename_in*>(data); in handle_fuse_request() local
1356 const char *old_name = ((const char*) data) + sizeof(*req); in handle_fuse_request()
1358 return handle_rename(fuse, handler, hdr, req, old_name, new_name); in handle_fuse_request()
1363 const struct fuse_open_in *req = static_cast<const struct fuse_open_in*>(data); in handle_fuse_request() local
1364 return handle_open(fuse, handler, hdr, req); in handle_fuse_request()
1368 const struct fuse_read_in *req = static_cast<const struct fuse_read_in*>(data); in handle_fuse_request() local
1369 return handle_read(fuse, handler, hdr, req); in handle_fuse_request()
1373 const struct fuse_write_in *req = static_cast<const struct fuse_write_in*>(data); in handle_fuse_request() local
1374 const void* buffer = (const __u8*)data + sizeof(*req); in handle_fuse_request()
1375 return handle_write(fuse, handler, hdr, req, buffer); in handle_fuse_request()
1383 const struct fuse_release_in *req = static_cast<const struct fuse_release_in*>(data); in handle_fuse_request() local
1384 return handle_release(fuse, handler, hdr, req); in handle_fuse_request()
1389 const struct fuse_fsync_in *req = static_cast<const struct fuse_fsync_in*>(data); in handle_fuse_request() local
1390 return handle_fsync(fuse, handler, hdr, req); in handle_fuse_request()
1402 const struct fuse_open_in *req = static_cast<const struct fuse_open_in*>(data); in handle_fuse_request() local
1403 return handle_opendir(fuse, handler, hdr, req); in handle_fuse_request()
1407 const struct fuse_read_in *req = static_cast<const struct fuse_read_in*>(data); in handle_fuse_request() local
1408 return handle_readdir(fuse, handler, hdr, req); in handle_fuse_request()
1412 const struct fuse_release_in *req = static_cast<const struct fuse_release_in*>(data); in handle_fuse_request() local
1413 return handle_releasedir(fuse, handler, hdr, req); in handle_fuse_request()
1417 const struct fuse_init_in *req = static_cast<const struct fuse_init_in*>(data); in handle_fuse_request() local
1418 return handle_init(fuse, handler, hdr, req); in handle_fuse_request()