lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070805202930.4ce62542@the-village.bc.nu>
Date:	Sun, 5 Aug 2007 20:29:30 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Jakob Oestergaard <jakob@...hought.net>,
	Jeff Garzik <jeff@...zik.org>, miklos@...redi.hu,
	akpm@...ux-foundation.org, neilb@...e.de, dgc@....com,
	tomoki.sekiyama.qu@...achi.com,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>, linux-mm@...ck.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	nikita@...sterfs.com, trond.myklebust@....uio.no,
	yingchao.zhou@...il.com, richard@....demon.co.uk, david@...g.hm
Subject: Re: [PATCH 00/23] per device dirty throttling -v8

> change relatime updates to be performed once per day. This makes
> relatime a compatible solution for HSM, mailer-notification and
> tmpwatch applications too.

Sweet
> 

> also add the CONFIG_DEFAULT_RELATIME kernel option, which makes
> "norelatime" the default for all mounts without an extra kernel
> boot option.

Should be a mount option.


> +	relatime        [FS] default to enabled relatime updates on all
> +			filesystems.
> +
> +	relatime=       [FS] default to enabled/disabled relatime updates on
> +			all filesystems.
> +

Double patch

>  	atkbd.extra=	[HW] Enable extra LEDs and keys on IBM RapidAccess,
>  			EzKey and similar keyboards
>  
> @@ -1100,6 +1106,12 @@ and is between 256 and 4096 characters. 
>  	noasync		[HW,M68K] Disables async and sync negotiation for
>  			all devices.
>  
> +	norelatime      [FS] default to disabled relatime updates on all
> +			filesystems.
> +
> +	norelatime=     [FS] default to disabled/enabled relatime updates
> +			on all filesystems.
> +

Double patch

> +config DEFAULT_RELATIME
> +	bool "Mount all filesystems with relatime by default"
> +	default y

Changes behaviour so probably should default n. Better yet it should be
the mount option so its flexible and strongly encouraged for vendors.

>  /*
> + * Allow users to disable (or enable) atime updates via a .config
> + * option or via the boot line, or via /proc/sys/fs/mount_with_relatime:
> + */
> +int mount_with_relatime __read_mostly =
> +#ifdef CONFIG_DEFAULT_RELATIME
> +1
> +#else
> +0
> +#endif
> +;

This ifdef mess would go away for a mount option

> +/*
> + * The "norelatime=", "atime=", "norelatime" and "relatime" boot parameters:
> + */
> +static int toggle_relatime_updates(int val)
> +{
> +	mount_with_relatime = val;
> +
> +	printk("Relative atime updates are: %s\n", val ? "on" : "off");
> +
> +	return 1;
> +}
> +
> +static int __init set_relatime_setup(char *str)
> +{
> +	int val;
> +
> +	get_option(&str, &val);
> +	return toggle_relatime_updates(val);
> +}
> +__setup("relatime=", set_relatime_setup);
> +
> +static int __init set_norelatime_setup(char *str)
> +{
> +	int val;
> +
> +	get_option(&str, &val);
> +	return toggle_relatime_updates(!val);
> +}
> +__setup("norelatime=", set_norelatime_setup);
> +
> +static int __init set_relatime(char *str)
> +{
> +	return toggle_relatime_updates(1);
> +}
> +__setup("relatime", set_relatime);
> +
> +static int __init set_norelatime(char *str)
> +{
> +	return toggle_relatime_updates(0);
> +}
> +__setup("norelatime", set_norelatime);


All the above chunk is unneccessary as it can be a mount option. That
avoids tons of messy extra code and complication. Users are far safer
editing fstab than grub.conf.

> +	{
> +		.ctl_name	= CTL_UNNUMBERED,
> +		.procname	= "mount_with_relatime",
> +		.data		= &mount_with_relatime,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec,
> +	},

More code you don't need if you just leave it as a mount option.

I'd much rather see the small clean patch for this as a mount option.
Leave the rest to users/distros/lwn and it'll just happen now you've
sorted the compabitility problems.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ