3219bc9a | 29-Nov-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: separate blob load md parsing from loading back_bs_dev
In current version, immidietly following parsing all metadata pages an action is taken inform of loading the back_bs_dev.
Patches la
lib/blob: separate blob load md parsing from loading back_bs_dev
In current version, immidietly following parsing all metadata pages an action is taken inform of loading the back_bs_dev.
Patches later in the series will add more metadata in form of extent pages, which have to be read separetly from usual blob metadata pages.
This patch add separation between the two steps, so later a device read can be put between.
Additionally, _spdk_blob_load_final() when no snapshot was present passed bserrno which was always 0. This patch just sets 0 directly there as no errors occured at that point.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I4a77527f90bb1de12f972591067b7a50926f39c9 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476427 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
1437b254 | 10-Jan-2020 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: make sizes of pages array consistent
Just to make all sizes consistent and less error prone.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Id0a21bbd45954a0f2317e0e
lib/blob: make sizes of pages array consistent
Just to make all sizes consistent and less error prone.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Id0a21bbd45954a0f2317e0eefd3725f1542ef04f Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479961 Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
eba7f9f5 | 10-Jan-2020 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: make sizes of cluster array consistent
Fixed size of check in _spdk_bs_snapshot_newblob_open_cpl().
Rest are just to make all consistent and more error prone.
Signed-off-by: Tomasz Zawad
lib/blob: make sizes of cluster array consistent
Fixed size of check in _spdk_bs_snapshot_newblob_open_cpl().
Rest are just to make all consistent and more error prone.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I5a23a7795f1e598c1cfd6d17ce37b367f2f34df8 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479960 Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
4b8db27b | 31-Dec-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: add _spdk_bs_md_page_to_lba() function internal to blobstore
The _spdk_bs_page_to_lba() [without 'md'] is only for translating the pages on the blobstore to lba they are at. Those pages st
lib/blob: add _spdk_bs_md_page_to_lba() function internal to blobstore
The _spdk_bs_page_to_lba() [without 'md'] is only for translating the pages on the blobstore to lba they are at. Those pages start at the begining of the device and cover all of it. Thus simple math is enough to translate those. It is used to calculate lba_count for set of pages as well.
Meanwhile there are 'md_pages' which are the same pages as for the above, but their count start at bs->md_start. Which is right after super_block and couple pages for bit masks.
This patch creates new _spdk_bs_md_page_to_lba() that is more explicit in what page number is passed. Hopefully avoiding confusion when reading which page number refers to which 'type' of page.
Exception to the that is _spdk_bs_dump_read_md_page(), where blobstore is not actually loaded (md_start from super block is not copied to bs structure).
Additionaly providing assert to catch errors on debug builds. Making the check in _spdk_blob_load_cpl() for max_md_lba obsolete.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I66bbca55b5ca3d6794c462d50177e6037ddbefa6 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479017 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
20c74e0c | 31-Dec-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: do not zero out cluster map for snapshot blob
Always when creating a snapshot, new blob is created. That blob is explcitly set as thin provisioned with size of the original blob in _spdk_b
lib/blob: do not zero out cluster map for snapshot blob
Always when creating a snapshot, new blob is created. That blob is explcitly set as thin provisioned with size of the original blob in _spdk_bs_snapshot_origblob_open_cpl().
Thus it should always contain empty cluster map, as API user has to interaction with it yet.
As sanity check for debug builds, verification if all clusters are 0's is added.
This empty cluster map is later swapped into the original blob in _spdk_bs_snapshot_swap_cluster_maps().
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I4b935c0cf08917e9ad7b9bbedac4781890626eec Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478974 Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
44502e42 | 02-Jan-2020 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: simplify loading snapshot completion
Refactor blob loading when snapshot is present. All paths now go through _spdk_blob_load_final().
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@inte
lib/blob: simplify loading snapshot completion
Refactor blob loading when snapshot is present. All paths now go through _spdk_blob_load_final().
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ifc927de6800501cdf62dba8d73e950af2a46d568 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479143 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
42432d49 | 02-Jan-2020 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: all error paths on blob load use _spdk_blob_load_final()
Since all error paths for blob load are now the same, they can go through common function to handle freeing and calling the origina
lib/blob: all error paths on blob load use _spdk_blob_load_final()
Since all error paths for blob load are now the same, they can go through common function to handle freeing and calling the original cb.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ib3afc7e62b6f9c872bb1d5f72ef61170aee966d7 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479142 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
e7b3be98 | 02-Jan-2020 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: always pass cb_arg on blob load failure
Originally the code was suposed to determine if loading the blob succeeded, based on passing the cb_arg. This breaks the logic of always getting the
lib/blob: always pass cb_arg on blob load failure
Originally the code was suposed to determine if loading the blob succeeded, based on passing the cb_arg. This breaks the logic of always getting the cb_arg in cb_fn, and basing the success on bserrno.
In order to fix this, cb_fn always gets the passed cb_arg. Meanwhile the cb_fn (_spdk_bs_open_blob_cpl(), now checks the bserrno to determine failure.
In addition since _spdk_bs_open_blob() was the original caller allocating the blob structure, the _spdk_bs_open_blob_cpl() is now responsible for freeing it.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ic7eb09f05e04b08dc54fc43243fd576f493cbeb2 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479141 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
3225f86b | 02-Jan-2020 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: save the sequence much earlier into blob load
The sequence was saved into the load context much later into the loading, instead of right when ctx is allocated.
This will come in handy in
lib/blob: save the sequence much earlier into blob load
The sequence was saved into the load context much later into the loading, instead of right when ctx is allocated.
This will come in handy in later patches that refer to sequence earlier (in error paths).
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ibe513dbd919f36874fcde763fc96d46973b60446 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479140 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
0d1aa025 | 22-Nov-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
blob: fix sequentially allocated clusters starting from 0
When serializing extents, run-length encoding is supposed to 1) RLE all sequential LBAs 2) RLE zero LBAs (unallocated)
There is one special
blob: fix sequentially allocated clusters starting from 0
When serializing extents, run-length encoding is supposed to 1) RLE all sequential LBAs 2) RLE zero LBAs (unallocated)
There is one special case, with sequential LBAs that start with 0 LBA. This is RLE as 1) case, but results in descriptor matching case 2). Which causes loss of allocated clusters.
This requires following conditions to be met: - blobstore has just a single cluster reserved for MD - blob is thin provisioned - first allocation occurs on cluster_num=1
For last part to be true, very first write for blob has to be issued to LBA between cluster_size and 2*cluster_size. Causing allocation of second cluster in blobstore and assiging it LBA equal to number of LBAs per cluster.
To fix this, case 1) disallows to RLE zeroes.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I136282407966310c882ca97c960e9a71c442c469 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475494 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
dc29e75b | 23-Oct-2019 |
paul luse <paul.e.luse@intel.com> |
lib/blob: minor refactor around clear_method
In prep for storing a clear_method in the blob metadata:
* Set the default to DEFAULT and let the switch statement choose UNMAP * Use switch statements
lib/blob: minor refactor around clear_method
In prep for storing a clear_method in the blob metadata:
* Set the default to DEFAULT and let the switch statement choose UNMAP * Use switch statements to make it clearer which method we are using and why. (ie previously we set the default to UNMAP and then had an UNMAP || DEFAULT condition to choose UNMAP.
Later in the patch series it will become clearer why this makes sense.
Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: I216cb97fd8eaa772437a36c2c7a47e66618bbfbd Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472202 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
show more ...
|
074413c5 | 11-Sep-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: update buf and buf_sz when serializing extent_rle
Originally serializing extent_rle was always done as last step. There was no need to update the buffer pointer, since it went unused.
Nex
lib/blob: update buf and buf_sz when serializing extent_rle
Originally serializing extent_rle was always done as last step. There was no need to update the buffer pointer, since it went unused.
Next patches in series expand serialization to new descriptors, so here the assumption is removed and buf/buf_sz is updated.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I7ccfb500d64e4276359cc98c5587c6301272d728 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468232 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
be45e54a | 11-Sep-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: simplify return path in serializing extent_rle
This patch simplifies return path when returning from serialization of extent_rle.
Both paths will share more code in upcoming patch.
Signe
lib/blob: simplify return path in serializing extent_rle
This patch simplifies return path when returning from serialization of extent_rle.
Both paths will share more code in upcoming patch.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ibb0ebcfe4377fe09709345d580d54050b61d3c88 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468231 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
3e372f35 | 10-Sep-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: rename extents to extents_rle
In future patches new type of extents will be added, for compatibility the current extent type will be still handled in the code.
To signify the difference b
lib/blob: rename extents to extents_rle
In future patches new type of extents will be added, for compatibility the current extent type will be still handled in the code.
To signify the difference between those two types, current type is renamed to SPDK_MD_DESCRIPTOR_TYPE_EXTENT_RLE. Along with any variables throughout the code, to make it clear which ones are used.
There are no functional changes in this patch.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I7186ccc452d200036188abf1dcea9660dcedee72 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468230 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
41f2d0e4 | 09-Jul-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: serialize extents in new function
This change moves the code related to serializing extents into serparate function, in order to allow more clear changes in further patches.
There are no
lib/blob: serialize extents in new function
This change moves the code related to serializing extents into serparate function, in order to allow more clear changes in further patches.
There are no functional changes in this patch.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: If8d7c90a5b01f1608d20fd00c3e4ff6a340ce305 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466919 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
7ed0ec68 | 02-Sep-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: removed unused idx variable from persist ctx
This variable went unused, since logic in _spdk_blob_persist_write_page_chain() already dealt with writing metadata from last to first page.
S
lib/blob: removed unused idx variable from persist ctx
This variable went unused, since logic in _spdk_blob_persist_write_page_chain() already dealt with writing metadata from last to first page.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ic70c47df1ea3bb01c8031244339c42e9936f28b0 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467248 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
8a252783 | 25-Sep-2019 |
Seth Howell <seth.howell@intel.com> |
log: remove old-style errlog entries.
SPDK_ERRLOG lists the function name, so remove old references that assume it doesn't and reprint the function name.
Change-Id: I69da6ca0a25bf0eda07d8dad52bcfad
log: remove old-style errlog entries.
SPDK_ERRLOG lists the function name, so remove old references that assume it doesn't and reprint the function name.
Change-Id: I69da6ca0a25bf0eda07d8dad52bcfadf964ac715 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469487 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
7392cdef | 16-Aug-2019 |
Seth Howell <seth.howell@intel.com> |
lib/blob: move bdev subdir under module directory.
Change-Id: Ifb9a1df919d32a98c328101029cc22e91915a977 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/
lib/blob: move bdev subdir under module directory.
Change-Id: Ifb9a1df919d32a98c328101029cc22e91915a977 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465457 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
bb63fe6f | 22-Jul-2019 |
Darek Stojaczyk <dariusz.stojaczyk@intel.com> |
blobstore: don't realloc any memory under scan-build
Scan-build has a real issue with reallocs. The original error from latest version of scan-build is rather complicated, but it can be greatly simp
blobstore: don't realloc any memory under scan-build
Scan-build has a real issue with reallocs. The original error from latest version of scan-build is rather complicated, but it can be greatly simplified with the following change:
> diff --git a/lib/blob/blobstore.c b/lib/blob/blobstore.c > index 7580c9dd2..6a594edf3 100644 > --- a/lib/blob/blobstore.c > +++ b/lib/blob/blobstore.c > @@ -1147,8 +1147,9 @@ > _spdk_blob_persist_clear_clusters_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int > } else if (blob->active.num_clusters != blob->active.cluster_array_size) { > tmp = realloc(blob->active.clusters, sizeof(uint64_t) * blob->active.num_clusters); > assert(tmp != NULL); > - blob->active.clusters = tmp; > - blob->active.cluster_array_size = blob->active.num_clusters; > + ctx->blob->active.clusters = tmp; > + assert(ctx->blob->active.clusters[0] != 14213); > + ctx->blob->active.cluster_array_size = ctx->blob->active.num_clusters; > } > > _spdk_blob_persist_complete(seq, ctx, bserrno); > ```
Scan-build will then complain:
blobstore.c:1151:10: warning: Use of memory after it is freed assert(ctx->blob->active.clusters[0] != 14213);
Asserting blob == ctx->blob, blob->active.clusters == ctx->..., or even tmp != blob->active.clusters doesn't work, so use the last resort scan-build weapon - #ifdef __clang_analyzer__.
The realloc in this case is just down-sizing a buffer to save some memory. For scan-build, just don't do it. This finally silences all scan-build false positives.
Change-Id: Ib88ea145370f5035eedd2412e98ee61f96ad1915 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462868 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
69642141 | 15-Jul-2019 |
Darek Stojaczyk <dariusz.stojaczyk@intel.com> |
blobstore: fix unused variable warning on non-debug builds
gcc complains:
blobstore.c: In function ‘_spdk_blob_load_cpl’: blobstore.c:978:12: warning: unused variable ‘max_md_lba’ [-Wunused-variabl
blobstore: fix unused variable warning on non-debug builds
gcc complains:
blobstore.c: In function ‘_spdk_blob_load_cpl’: blobstore.c:978:12: warning: unused variable ‘max_md_lba’ [-Wunused-variable]
Change-Id: If2875d2d83edce6d1b544d6a4f51e78fa760d752 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461750 Reviewed-by: Seth Howell <seth.howell5141@gmail.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
672d42b2 | 09-Jul-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: fix check against lba during blob load
md_start and md_len are values in pages rather than lba. Those should not be compared against lba of currently loaded md page.
This patch changes as
lib/blob: fix check against lba during blob load
md_start and md_len are values in pages rather than lba. Those should not be compared against lba of currently loaded md page.
This patch changes assert to verify if the lba of current page does not exceed max lba where md is expected to be.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Id445eb9871f82f7fe367bfc396f1b495591511c1 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460976 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
show more ...
|
6ced6015 | 05-Jul-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: only validate blobid of first page during bs_load
Blob id only is matched to the very first page of md for that particular blob.
During loading blobstore, we shouldn't verify further page
lib/blob: only validate blobid of first page during bs_load
Blob id only is matched to the very first page of md for that particular blob.
During loading blobstore, we shouldn't verify further pages in chain against the blobid.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ifc7863ddcb403aedc264c14e6b4c3915bd30dc41 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460607 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
show more ...
|
69a8877e | 01-Jul-2019 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: do not allow xattr to exceed maximum descriptor length
Length of xattr descriptor is equal to length of xattr struct, xattr name and the len of stored value.
There is no limit to how much
lib/blob: do not allow xattr to exceed maximum descriptor length
Length of xattr descriptor is equal to length of xattr struct, xattr name and the len of stored value.
There is no limit to how much can be stored in memory for xattr. On disk xattr size is limited to single page and within that to max descriptors that can fit in it. This size is known at compile time.
Before this patch it was possible to add xattr exceeding what was possible to be written to disk. This caused issues when serializing the metadata during spdk_blob_sync_md() or spdk_blob_close(). Making those fail without specific info to the user and not actually writting such descriptor.
Since maximum length of xattr descriptor is known at compile time, this patch compares against this value when setting the xattr. It will immediately report back to user with error, and will not store xattr in memory (thus not serialize it).
This patch should not affect any backward compatibility for blobs. Too large xattrs weren't written to disk before, API for blobstore stays the same - only reporting ENOMEM when it should.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I6f4af4d079e47f084e20d7a4969d9a78ec1f8610 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460450 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Maciej Szwed <maciej.szwed@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
show more ...
|
e8356fd2 | 21-May-2019 |
Maciej Szwed <maciej.szwed@intel.com> |
blobstore: Cleanup after power failure while creating snapshot
Currently we are missing cleanup routine for case when power failure interrupts creating snapshot. This patch add such routine.
For th
blobstore: Cleanup after power failure while creating snapshot
Currently we are missing cleanup routine for case when power failure interrupts creating snapshot. This patch add such routine.
For the case where we find blob with a parent snapshot ID matching newly created snapshot we can finish whole process during recovery by processing forward with setting snpashot as read only, removing xattr and syncing. We should remove snapshot only if there is no blob with parent pointing at snapshot.
Fixes github issue #760
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com> Change-Id: I2f0e298164e07a2b4dfa5367e8878facef640702 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455216 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
show more ...
|
f27cbce4 | 21-May-2019 |
Maciej Szwed <maciej.szwed@intel.com> |
blobstore: Fix error path for snapshot creation
In _spdk_bs_snapshot_origblob_sync_cpl function on error path we should not close snapshot as it will be closed during volume closing when bs_dev is b
blobstore: Fix error path for snapshot creation
In _spdk_bs_snapshot_origblob_sync_cpl function on error path we should not close snapshot as it will be closed during volume closing when bs_dev is being destroyed. This issue was found in unit test (see next patch in series).
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com> Change-Id: I51c38d1f1f97b134679251b43109b1265e565a17 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455215 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
show more ...
|