Skip to contentSkip to conversation

io_uring: add support for zone-append

PATCH Alexey Dobriyan 2 participants 2 messages Jun 19, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 4 lines
	uint64_t val = cqe->res; // assuming non-error here

	if (cqe->flags & IORING_CQE_F_ZONE_FOO)
		val |= (cqe->flags >> 16) << 32ULL;

Jens, ULL in shift doesn't do anything for widening the result. You need

	val |= (uint64_t)(cqe->flags >> 16) << 32;
maintainer
#1 lore raw
Quoted 9 lines · Alexey Dobriyan
Quoted 4 lines
	uint64_t val = cqe->res; // assuming non-error here

	if (cqe->flags & IORING_CQE_F_ZONE_FOO)
		val |= (cqe->flags >> 16) << 32ULL;

Jens, ULL in shift doesn't do anything for widening the result. You need

	val |= (uint64_t)(cqe->flags >> 16) << 32;

You're right of course, guess I should check my in-mail code a bit better :-)

Signature · 1 line
Jens Axboe