Re: [PATCH] deprecate use of bdflush()

From: Robert Love (rml@tech9.net)
Date: Mon Dec 02 2002 - 17:26:32 EST


On Mon, 2002-12-02 at 17:11, Andrew Morton wrote:

> Ho-hum. I was going to do this months ago but general exhaustion
> and sluggishness won out.
>
> We should tell the user which process called sys_bdflush() to aid
> their expunging efforts.

Good idea.

I could do without the rate limiting, though - the print is after the
CAP_SYS_ADMIN check. Root has plenty of other ways to print crap to the
screen and it saves 32-bits from bss. But, uh, not a big deal at all
either way.

        Robert Love

 fs/buffer.c | 7 +++++++
 1 files changed, 7 insertions(+)

diff -urN linux-2.5.49-mm2/fs/buffer.c linux/fs/buffer.c
--- linux-2.5.49-mm2/fs/buffer.c 2002-12-02 16:07:53.000000000 -0500
+++ linux/fs/buffer.c 2002-12-02 17:24:57.000000000 -0500
@@ -2757,11 +2757,18 @@
 /*
  * There are no bdflush tunables left. But distributions are
  * still running obsolete flush daemons, so we terminate them here.
+ *
+ * Use of bdflush() is deprecated and will be removed in a future kernel.
+ * The `pdflush' kernel threads fully replace bdflush daemons and this call.
  */
 asmlinkage long sys_bdflush(int func, long data)
 {
         if (!capable(CAP_SYS_ADMIN))
                 return -EPERM;
+
+ printk(KERN_WARNING "warning: process `%s' used the deprecated bdflush"
+ " system call. Fix your initscripts?\n",
+ current->comm);
         if (func == 1)
                 do_exit(0);
         return 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 07 2002 - 22:00:14 EST