Content-Type: multipart/mixed; boundary="===============4286774444082603477==" MIME-Version: 1.0 From: dimitra.giantsidi at gmail.com Subject: [SPDK] Rocksdb with SPDK Date: Wed, 30 Sep 2020 19:05:21 +0000 Message-ID: <20200930190521.2619.66181@ml01.vlan13.01.org> List-ID: To: spdk@lists.01.org --===============4286774444082603477== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi all, = I am running Rocksdb on top of a blobfs filesystem and I have a couple of q= uestions. = 1. What exactly does the ```sanitize_path()``` function do and why do we ne= ed to sanitize the path before opening a file? If the fname is /mnt/rocksdb= /log, the sanitize path returns /log .. What does that means for my applica= tion? 2. the file->Sync() operations fails with a message "Not Implemented". In p= articular, I am having the following code : ``` if (!FLAGS__spdk.empty()) { FLAGS_env =3D rocksdb::NewSpdkEnv(FLAGS_env, FLAGS_= dir, FLAGS__spdk, FLAGS__spdk_bdev, FLAGS__spdk_cache_size); fprintf(stdout, "Using rocksdb::NewSpdkEnv() enviro= nment.\n"); if (FLAGS_env =3D=3D nullptr) { fprintf(stderr, "Could not load SPDK blobfs= - check that SPDK mkfs was run " "against block device %s.\n= ", FLAGS__spdk_bdev.c_str()); exit(1); } = } unique_ptr file; EnvOptions soptions; rocksdb::Slice data =3D return_data(FLAGS__value_size); Status s =3D FLAGS_env->NewWritableFile(FLAGS_file, &file, = soptions); if (!s.ok()) { fprintf(stderr, "oops ..\n"); abort(); } size_t size =3D 0; size_t total_size =3D FLAGS_total_size*1024; struct timeval start_time, end_time; gettimeofday(&start_time, NULL); while (size < total_size) { s =3D file->Append(data); if (s.ok()) { s =3D file->Sync(); } size +=3D FLAGS__value_size; if (!s.ok()) { fprintf(stdout, "written %d bytes to %s (%s= )..\n", size, FLAGS_file.c_str(), s.ToString().c_str()); abort(); } } ``` However, I am seeing that the rocksdb::SpdkWritableFile::Sync() is implemen= ted .. Any ideas? Thanks for your help :) Dimitra --===============4286774444082603477==--