Thread (9 messages) 9 messages, 4 authors, 2020-05-30

Re: [PATCH v2] block: improve discard bio alignment in __blkdev_issue_discard()

From: Bart Van Assche <bvanassche@acm.org>
Date: 2020-05-30 01:27:51

On 2020-05-29 09:34, Coly Li wrote:
+static inline unsigned int bio_aligned_discard_max_sectors(
+					struct request_queue *q)
+{
+	return round_down(UINT_MAX,
+			 (q->limits.max_discard_sectors << SECTOR_SHIFT))
+			>> SECTOR_SHIFT;
+}
max_discard_sectors has been declared as an unsigned int. Can the shift
left operation overflow?

Thanks,

Bart.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help