QUEUE_STANDBY_EN flag made the used bits more than 31 so it is now
required that queue_flags is a 64 bits. Add compile time check to
ensure it is.

https://jira.sw.ru/browse/PSBM-144163
Signed-off-by: Alexander Atanasov <alexander.atana...@virtuozzo.com>
---
 drivers/block/ploop/dev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 32f4a394e4b8..4e06123f4f14 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -3623,6 +3623,9 @@ static int ploop_replace_delta(struct ploop_device * plo, 
unsigned long arg)
        spin_lock_irq(plo->queue->queue_lock);
        queue_flag_clear(QUEUE_FLAG_STANDBY, plo->queue);
        spin_unlock_irq(plo->queue->queue_lock);
+       BUILD_BUG_ON_MSG(sizeof(plo->queue->queue_flags) * 8 < BITS_PER_LONG ||
+                                        BITS_PER_LONG < 64,
+                       "queue_flags require 64 bit storage variable");
 
        ploop_relax(plo);
 
-- 
2.31.1

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to