Lines Matching defs:rqst
268 static int send_packet(CNID_private *db, struct cnid_dbd_rqst *rqst)
274 iov[0].iov_base = rqst;
279 if (rqst->namelen) {
280 iov[1].iov_base = rqst->name;
281 iov[1].iov_len = rqst->namelen;
282 towrite += rqst->namelen;
287 LOG(log_warning, logtype_cnid, "send_packet: Error writev rqst (db_dir %s): %s",
297 static void dbd_initstamp(struct cnid_dbd_rqst *rqst)
299 RQST_RESET(rqst);
300 rqst->op = CNID_DBD_OP_GETSTAMP;
324 static int dbd_rpc(CNID_private *db, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
330 if (send_packet(db, rqst) < 0) {
363 static int transmit(CNID_private *db, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
410 if (!dbd_rpc(db, rqst, rply)) {
549 struct cnid_dbd_rqst rqst;
565 RQST_RESET(&rqst);
566 rqst.op = CNID_DBD_OP_ADD;
569 rqst.dev = st->st_dev;
572 rqst.ino = st->st_ino;
573 rqst.type = S_ISDIR(st->st_mode)?1:0;
574 rqst.cnid = hint;
575 rqst.did = did;
576 rqst.name = name;
577 rqst.namelen = len;
580 ntohl(did), name, (long long)st->st_ino, rqst.type);
583 if (transmit(db, &rqst, &rply) < 0) {
613 struct cnid_dbd_rqst rqst;
631 RQST_RESET(&rqst);
632 rqst.op = CNID_DBD_OP_GET;
633 rqst.did = did;
634 rqst.name = name;
635 rqst.namelen = len;
638 if (transmit(db, &rqst, &rply) < 0) {
666 struct cnid_dbd_rqst rqst;
683 RQST_RESET(&rqst);
684 rqst.op = CNID_DBD_OP_RESOLVE;
685 rqst.cnid = *id;
691 if (transmit(db, &rqst, &rply) < 0) {
740 struct cnid_dbd_rqst rqst;
756 RQST_RESET(&rqst);
757 rqst.op = CNID_DBD_OP_LOOKUP;
760 rqst.dev = st->st_dev;
763 rqst.ino = st->st_ino;
764 rqst.type = S_ISDIR(st->st_mode)?1:0;
765 rqst.did = did;
766 rqst.name = name;
767 rqst.namelen = len;
770 ntohl(did), name, (long long)st->st_ino, rqst.type);
773 if (transmit(db, &rqst, &rply) < 0) {
801 struct cnid_dbd_rqst rqst;
819 RQST_RESET(&rqst);
820 rqst.op = CNID_DBD_OP_SEARCH;
822 rqst.name = name;
823 rqst.namelen = namelen;
828 if (transmit(db, &rqst, &rply) < 0) {
857 struct cnid_dbd_rqst rqst;
872 RQST_RESET(&rqst);
873 rqst.op = CNID_DBD_OP_UPDATE;
874 rqst.cnid = id;
876 rqst.dev = st->st_dev;
878 rqst.ino = st->st_ino;
879 rqst.type = S_ISDIR(st->st_mode)?1:0;
880 rqst.did = did;
881 rqst.name = name;
882 rqst.namelen = len;
885 ntohl(id), name, (long long)st->st_ino, rqst.type);
888 if (transmit(db, &rqst, &rply) < 0) {
912 struct cnid_dbd_rqst rqst;
928 RQST_RESET(&rqst);
929 rqst.op = CNID_DBD_OP_REBUILD_ADD;
932 rqst.dev = st->st_dev;
935 rqst.ino = st->st_ino;
936 rqst.type = S_ISDIR(st->st_mode)?1:0;
937 rqst.did = did;
938 rqst.name = name;
939 rqst.namelen = len;
940 rqst.cnid = hint;
943 ntohl(did), name, (long long)st->st_ino, rqst.type, hint);
945 if (transmit(db, &rqst, &rply) < 0) {
974 struct cnid_dbd_rqst rqst;
985 RQST_RESET(&rqst);
986 rqst.op = CNID_DBD_OP_DELETE;
987 rqst.cnid = id;
990 if (transmit(db, &rqst, &rply) < 0) {