Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into merge_upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
grwilson committed Dec 3, 2021
2 parents 0375199 + a70ac9c commit 0588a58
Show file tree
Hide file tree
Showing 21 changed files with 182 additions and 133 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/zfs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:

jobs:
tests:
zfs-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zfs-tests-object-store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:

jobs:
tests:
tests-object-store:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zfs-tests-sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:

jobs:
tests:
tests-sanity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zloop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:

jobs:
tests:
zloop:
runs-on: ubuntu-latest
env:
TEST_DIR: /var/tmp/zloop
Expand Down
12 changes: 11 additions & 1 deletion cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -8477,7 +8477,7 @@ main(int argc, char **argv)
zfs_btree_verify_intensity = 3;

while ((c = getopt(argc, argv,
"a:AB:bcCdDeEf:Fg:GhiI:klLmMo:Op:PqrRsSt:uU:vVx:XYyZz")) != -1) {
"a:AB:bcCdDeEf:Fg:GhiI:klLmMo:Op:PqrRsSt:uU:vVx:XYyZz:")) != -1) {
switch (c) {
case 'b':
case 'c':
Expand Down Expand Up @@ -8631,6 +8631,16 @@ main(int argc, char **argv)
}

if (objstore) {
if (dump_opt['R']) {
(void) fprintf(stderr, "Reading blocks (-R) is "
"unsupported for an object-store based zpool.\n");
exit(1);
}
if (dump_opt['Z']) {
(void) fprintf(stderr, "Reading ZSTD headers (-Z) is "
"unsupported for an object-store based zpool.\n");
exit(1);
}
if (start_zfs_object_agent(zoa_log_file) != 0) {
(void) fprintf(stderr, "Error initializing libzoa.\n");
exit(1);
Expand Down
17 changes: 16 additions & 1 deletion cmd/zfs_object_agent/zettaobject/src/root_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use std::sync::Arc;
use util::get_tunable;
use util::maybe_die_with;
use util::AlignedBytes;
use util::From64;
use uuid::Uuid;
use zettacache::base_types::*;
use zettacache::ZettaCache;
Expand Down Expand Up @@ -353,14 +354,28 @@ impl RootConnectionState {
let request_id = nvl.lookup_uint64("request_id")?;
let token = nvl.lookup_uint64("token")?;
let heal = bool_value(&nvl, "heal")?;
let size = nvl.lookup_uint64("size")?;

let pool = self
.pool
.as_ref()
.ok_or_else(|| anyhow!("no pool open"))?
.clone();
Ok(Box::pin(async move {
let data = pool.read_block(block, heal).await;
let mut data = pool.read_block(block, heal).await;

//
// If the cache has the wrong content/size for this BlockId, then proactively do a healing read
// from the object store.
//
if !heal && data.len() != usize::from64(size) {
debug!(
"read size mismatch: expected={} actual={}",
size,
data.len()
);
data = pool.read_block(block, true).await;
}
let mut nvl = NvList::new_unique_names();
nvl.insert("Type", "read done").unwrap();
nvl.insert("block", &block.0).unwrap();
Expand Down
7 changes: 4 additions & 3 deletions cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,10 @@ get_usage(zpool_help_t idx)
"[newpool]\n"));
case HELP_IOSTAT:
return (gettext("\tiostat [[[-c [script1,script2,...]"
"[-lq]]|[-rw]] [-T d | u] [-ghHLpPvy] [-o [-l|-q|-r|-w]]\n"
"\t [[pool ...]|[pool vdev ...]|[vdev ...]]"
" [[-n] interval [count]]\n"));
"[-lq]]|[-rw]] [-T d | u] [-ghHLpPvy]\n"
"\t [-o [-l|-q|-r|-w]] [[pool ...]|[pool vdev ...]"
"|[vdev ...]]\n"
"\t [[-n] interval [count]]\n"));
case HELP_LABELCLEAR:
return (gettext("\tlabelclear [-f] <vdev>\n"));
case HELP_LIST:
Expand Down
Loading

0 comments on commit 0588a58

Please sign in to comment.