Re: [PATCH] deprecate use of bdflush()

From: Andrew Morton (akpm@digeo.com)
Date: Mon Dec 02 2002 - 17:11:25 EST


Robert Love wrote:
>
> We can never get rid of it if we do not deprecate it - so do so and
> print a stern warning to those who still run bdflush daemons.
>

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.

--- 25/fs/buffer.c~deprecate-bdflush Mon Dec 2 13:40:44 2002
+++ 25-akpm/fs/buffer.c Mon Dec 2 13:45:11 2002
@@ -2755,11 +2755,25 @@ int block_sync_page(struct page *page)
 /*
  * 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)
 {
+ static int msg_count;
+
         if (!capable(CAP_SYS_ADMIN))
                 return -EPERM;
+
+ if (msg_count < 5) {
+ msg_count++;
+ printk(KERN_INFO
+ "warning: process `%s' used the obsolete bdflush"
+ " system call\nFix 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