]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/options: change osd_target_transaction_size from int to uint 64500/head
authorKefu Chai <tchaikov@gmail.com>
Tue, 15 Jul 2025 06:40:09 +0000 (14:40 +0800)
committerKefu Chai <k.chai@proxmox.com>
Sat, 21 Feb 2026 11:05:29 +0000 (19:05 +0800)
Change osd_target_transaction_size from signed int to unsigned int to
match the return type of Transaction::get_num_opts() (ceph_le64).

This change:
- Eliminates compiler warnings when comparing signed/unsigned values
- Enables automatic size conversion (e.g., "4_K" → 4096) via y2c.py
  for improved administrator usability
- Maintains type consistency throughout the codebase

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/common/options/global.yaml.in
src/osd/OSD.cc

index f3ebf1b1a8e2e8c6c24fa28af5545eea29ea5cd2..035d81346850934cad851761c263f4c0d131e476 100644 (file)
@@ -3393,7 +3393,7 @@ options:
   with_legacy: true
 # to adjust various transactions that batch smaller items
 - name: osd_target_transaction_size
-  type: int
+  type: uint
   level: advanced
   default: 30
   with_legacy: true
index 4de408d146f0438bdcd84b16354a341ed64533e6..d99ea15605b7461789f9234817e3371ad838a677 100644 (file)
@@ -5061,7 +5061,7 @@ void OSD::clear_temp_objects()
     }
     if (!temps.empty()) {
       ObjectStore::Transaction t;
-      int removed = 0;
+      unsigned removed = 0;
       for (vector<ghobject_t>::iterator q = temps.begin(); q != temps.end(); ++q) {
        dout(20) << "  removing " << *p << " object " << *q << dendl;
        t.remove(*p, *q);