From c2b40b6bf54768f1a23e4a881287608f7c3a1724 Mon Sep 17 00:00:00 2001 From: alex <alex> Date: Mon, 5 Sep 2005 14:47:38 +0000 Subject: [PATCH] - complain if kernel doesn't support 1MB request --- lustre/lvfs/fsfilt_ext3.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 7e88750b09..f50b9f68f2 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -1247,6 +1247,17 @@ static int fsfilt_ext3_setup(struct obd_device *obd, struct super_block *sb) sbi->s_mdsnum = es->s_mdsnum; } #endif + if (!strncmp(obd->obd_type->typ_name, "obdfilter", 9)) { +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) + request_queue_t *q = bdev_get_queue(sb->s_bdev); + if (q->max_phys_segments * PAGE_SIZE < (1 << 20)) +#else + if (MAX_SEGMENTS * PAGE_SIZE < (1 << 20)) +#endif + CDEBUG(D_WARNING, "Lustre loves 1MB requests, " + "but current max_phys_segments=%d\n", + q->max_phys_segments); + } return 0; } -- GitLab