]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: partition args the right way 27211/head
authorKefu Chai <kchai@redhat.com>
Wed, 27 Mar 2019 10:30:43 +0000 (18:30 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 27 Mar 2019 10:47:43 +0000 (18:47 +0800)
commit9801576b8e88d27fd4318b87d78c2ae9f08ec0ae
treef403f0a0e9522e6ffe9786a9c52fd6e6551a68ed
parentcdba92a1e3cb64f503c1ed753c4a74e8616fa1f6
crimson/osd: partition args the right way

before this change, all "unknown" args are considered `ceph_args`, but
there is chance we have command line like

crimson-osd -i 1 -c ceph.conf --smp 1 --cpuset 00000001

in this case, "1" is listed in `unknown_args`, but it is also in
`parsed.options`. so we will put the second "1" into `ceph_args` even it
should be appended to `app_args`.

so, in this change, `std::partition_copy()` is replaced with a
hand-written loop which advances through the `argv` and `unknown_args`,
try to match as many consecutive options are possible. it assumes that
the order of args in `unknown_args` is the same as their order in
`argv[]`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/main.cc