[Concept,17/19] linux: blkdev: Add blk_plug structure and operations
Commit Message
From: Simon Glass <simon.glass@canonical.com>
Move block I/O plugging stubs to linux/blkdev.h where they belong
in the Linux kernel organisation.
Add to blkdev.h:
- struct blk_plug - block I/O plug structure
- blk_start_plug() - start plugging (stub no-op)
- blk_finish_plug() - finish plugging (stub no-op)
These are stubs since U-Boot doesn't use block I/O plugging.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
fs/ext4l/ext4_uboot.h | 7 +------
include/linux/blkdev.h | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+), 6 deletions(-)
@@ -925,12 +925,7 @@ static inline xa_mark_t wbc_to_tag(struct writeback_control *wbc)
return PAGECACHE_TAG_DIRTY;
}
-/* blk_plug - block I/O plugging stub */
-struct blk_plug {
- int dummy;
-};
-#define blk_start_plug(p) do { (void)(p); } while (0)
-#define blk_finish_plug(p) do { (void)(p); } while (0)
+/* blk_plug is now in linux/blkdev.h */
/* Writeback reasons */
#define WB_REASON_FS_FREE_SPACE 0
@@ -18,4 +18,29 @@ struct gendisk;
/* Block size helpers */
#define bdev_logical_block_size(bdev) 512
+/**
+ * struct blk_plug - block I/O plug
+ *
+ * U-Boot stub - block I/O plugging is not used.
+ */
+struct blk_plug {
+ int dummy;
+};
+
+/**
+ * blk_start_plug() - start plugging block I/O
+ * @plug: plug structure
+ *
+ * U-Boot stub - no-op.
+ */
+#define blk_start_plug(plug) do { (void)(plug); } while (0)
+
+/**
+ * blk_finish_plug() - finish plugging and submit I/O
+ * @plug: plug structure
+ *
+ * U-Boot stub - no-op.
+ */
+#define blk_finish_plug(plug) do { (void)(plug); } while (0)
+
#endif /* _LINUX_BLKDEV_H */