diff mbox

[v4,8/8] zram: enable contextless compression alg in zram

Message ID 20151015020549.GE1735@swordfish (mailing list archive)
State RFC
Delegated to: Herbert Xu
Headers show

Commit Message

Sergey Senozhatsky Oct. 15, 2015, 2:05 a.m. UTC
On (10/14/15 16:38), Joonsoo Kim wrote:
[..]
> @@ -352,6 +352,7 @@ static ssize_t comp_algorithm_show(struct device *dev,
>  	size_t sz;
>  	struct zram *zram = dev_to_zram(dev);
>  
> +	deprecated_attr_warn("comp_algorithm");
>  	down_read(&zram->init_lock);
>  	sz = zcomp_available_show(zram->compressor, buf);
>  	up_read(&zram->init_lock);

oh, one more thing.

deprecated_attr_warn() should come with `Documentation/ABI/obsolete/sysfs-block-zram' update.
something like:



---


And I guess Cc `Jonathan Corbet <corbet@lwn.net>' (doc maintainer) and
'linux-api@vger.kernel.org' will be the right thing to do here.

	-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Joonsoo Kim Oct. 15, 2015, 2:48 a.m. UTC | #1
On Thu, Oct 15, 2015 at 11:05:49AM +0900, Sergey Senozhatsky wrote:
> On (10/14/15 16:38), Joonsoo Kim wrote:
> [..]
> > @@ -352,6 +352,7 @@ static ssize_t comp_algorithm_show(struct device *dev,
> >  	size_t sz;
> >  	struct zram *zram = dev_to_zram(dev);
> >  
> > +	deprecated_attr_warn("comp_algorithm");
> >  	down_read(&zram->init_lock);
> >  	sz = zcomp_available_show(zram->compressor, buf);
> >  	up_read(&zram->init_lock);
> 
> oh, one more thing.
> 
> deprecated_attr_warn() should come with `Documentation/ABI/obsolete/sysfs-block-zram' update.
> something like:
> 
> diff --git a/Documentation/ABI/obsolete/sysfs-block-zram b/Documentation/ABI/obsolete/sysfs-block-zram
> index 720ea92..ad5b59d 100644
> --- a/Documentation/ABI/obsolete/sysfs-block-zram
> +++ b/Documentation/ABI/obsolete/sysfs-block-zram
> @@ -117,3 +117,14 @@ Description:
>                 Downgraded to write-only node: so it's possible to set new
>                 value only; its current value is stored in zram<id>/mm_stat
>                 node.
> +
> +What:          /sys/block/zram<id>/comp_algorithm
> +Date:          XXX
> +Contact:       XXX
> +Description:
> +               The comp_algorithm file is read/write and provides information
> +               on available, currently selected compression algorithm (read
> +               operation) and lets one to change the compression algorithm
> +               (write operation).
> +               Downgraded to write-only node: use `/proc/crypto' to get the
> +               list of supported compression algorithms.
> 
> 
> ---
> 
> 
> And I guess Cc `Jonathan Corbet <corbet@lwn.net>' (doc maintainer) and
> 'linux-api@vger.kernel.org' will be the right thing to do here.

Okay. I will do it in next spin.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/ABI/obsolete/sysfs-block-zram b/Documentation/ABI/obsolete/sysfs-block-zram
index 720ea92..ad5b59d 100644
--- a/Documentation/ABI/obsolete/sysfs-block-zram
+++ b/Documentation/ABI/obsolete/sysfs-block-zram
@@ -117,3 +117,14 @@  Description:
                Downgraded to write-only node: so it's possible to set new
                value only; its current value is stored in zram<id>/mm_stat
                node.
+
+What:          /sys/block/zram<id>/comp_algorithm
+Date:          XXX
+Contact:       XXX
+Description:
+               The comp_algorithm file is read/write and provides information
+               on available, currently selected compression algorithm (read
+               operation) and lets one to change the compression algorithm
+               (write operation).
+               Downgraded to write-only node: use `/proc/crypto' to get the
+               list of supported compression algorithms.