]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Get rid of unused FileReader's "random"
authorAdam Kupczyk <akupczyk@ibm.com>
Mon, 10 Mar 2025 12:32:03 +0000 (12:32 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Fri, 28 Mar 2025 16:06:02 +0000 (16:06 +0000)
It is just not used.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h

index e4301b0aa2e36cd79a30d8e0383e9626825303cd..c68d5d252926bb73ff85aa343ba51171cb104b49 100644 (file)
@@ -1369,7 +1369,6 @@ int BlueFS::_replay(bool noop, bool to_stdout)
 
   FileReader *log_reader = new FileReader(
     log_file, cct->_conf->bluefs_max_prefetch,
-    false,  // !random
     true);  // ignore eof
 
   bool seen_recs = false;
@@ -2402,7 +2401,7 @@ void BlueFS::_wal_index_file(
   File::wal_flush_t flush;
   bool envelope_good;
   uint64_t file_size = file->fnode.size;
-  FileReader *h = new FileReader(file, 4096, false, true);
+  FileReader *h = new FileReader(file, 4096, true);
   ceph_assert(h);
   while(scan_ofs < file->fnode.allocated) {
     envelope_good = _read_wal_flush(h, scan_ofs, wal_ofs, &flush);
@@ -4698,7 +4697,7 @@ int BlueFS::open_for_read(
     _wal_index_file(file);
   }
   *h = new FileReader(file, random ? 4096 : cct->_conf->bluefs_max_prefetch,
-                     random, file->is_new_wal());
+                      file->is_new_wal());
   dout(10) << __func__ << " h " << *h << " on " << file->fnode << dendl;
   return 0;
 }
index c23496018136a26ac968a5456e09aa37049e43ca..804c709f819acd00ed41af39f44244928cd65551 100644 (file)
@@ -527,18 +527,15 @@ public:
 
     FileRef file;
     FileReaderBuffer buf;
-    bool random;
     bool ignore_eof;        ///< used when reading our log file
-
     ceph::shared_mutex lock {
      ceph::make_shared_mutex(std::string(), false, false, false)
     };
 
 
-    FileReader(FileRef f, uint64_t mpf, bool rand, bool ie)
+    FileReader(FileRef f, uint64_t mpf, bool ie)
       : file(f),
        buf(mpf),
-       random(rand),
        ignore_eof(ie) {
       ++file->num_readers;
     }