search for: nbdkit_rounding_h

Displaying 5 results from an estimated 5 matches for "nbdkit_rounding_h".

2018 Sep 17
0
[PATCH nbdkit v2] common: Introduce round up, down; and divide round up functions.
...PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef NBDKIT_ROUNDING_H +#define NBDKIT_ROUNDING_H + +#include <stdint.h> +#include <assert.h> + +#include "ispowerof2.h" + +/* Round up i to next multiple of n (n must be a power of 2). + */ +#define ROUND_UP(i, n) ({ \ + assert (is_power_of_2 (n)); \ +...
2018 Sep 17
2
[PATCH nbdkit v2] common: Introduce round up, down; and divide round
Since we're using ({ .. }) gcc/clang extension, let's rewrite the rounding.h change too. Rich.
2018 Sep 17
0
[PATCH nbdkit v3 2/3] common: Introduce round up, down; and divide round up functions.
...PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef NBDKIT_ROUNDING_H +#define NBDKIT_ROUNDING_H + +#include <assert.h> + +#include "ispowerof2.h" + +/* Round up i to next multiple of n (n must be a power of 2). + */ +#define ROUND_UP(i, n) ({ \ + assert (is_power_of_2 (n)); \ + ((i) + (n) - 1) &...
2018 Sep 17
4
[PATCH nbdkit 0/3] Add partitioning plugin.
nbdkit partitioning boot.img swap.img root.img ... creates a virtual disk by adding a partition table. In ancient times Xen used to do this. Rich.
2018 Sep 17
7
[PATCH nbdkit v3 0/3] Add partitioning plugin.
The partitioning plugin patch is the same (except for rebasing). However I have changed the first two patches based on feedback received. In particular this fixes a very serious bug found by Eric Blake in the current truncate filter. Rich.