[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <56831927.50205@samsung.com>
Date: Wed, 30 Dec 2015 00:37:11 +0100
From: Krzysztof Opasiak <k.opasiak@...sung.com>
To: Christoph Hellwig <hch@....de>, jlbec@...lplan.org,
akpm@...ux-foundation.org, nab@...ux-iscsi.org
Cc: pantelis.antoniou@...sulko.com, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] configfs: implement binary attributes
W dniu 2015-12-24 o 15:51, Christoph Hellwig pisze:
> From: Pantelis Antoniou <pantelis.antoniou@...sulko.com>
>
> ConfigFS lacked binary attributes up until now. This patch
> introduces support for binary attributes in a somewhat similar
> manner of sysfs binary attributes albeit with changes that
> fit the configfs usage model.
>
> Problems that configfs binary attributes fix are everything that
> requires a binary blob as part of the configuration of a resource,
> such as bitstream loading for FPGAs, DTBs for dynamically created
> devices etc.
>
> Look at Documentation/filesystems/configfs/configfs.txt for internals
> and howto use them.
>
> This patch is against linux-next as of today that contains
> Christoph's configfs rework.
>
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@...sulko.com>
> [hch: folded a fix from Geert Uytterhoeven <geert+renesas@...der.be>]
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
(...)
>
> #include <linux/configfs.h>
> @@ -48,6 +49,10 @@ struct configfs_buffer {
> struct configfs_item_operations * ops;
> struct mutex mutex;
> int needs_read_fill;
> + int read_in_progress;
> + int write_in_progress;
Those 2 should be probably bool instead of int.
> + char *bin_buffer;
> + int bin_buffer_size;
> };
(...)
> diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c
> index eae8757..0cc810e 100644
> --- a/fs/configfs/inode.c
> +++ b/fs/configfs/inode.c
> @@ -218,7 +218,7 @@ const unsigned char * configfs_get_name(struct configfs_dirent *sd)
> if (sd->s_type & (CONFIGFS_DIR | CONFIGFS_ITEM_LINK))
> return sd->s_dentry->d_name.name;
>
> - if (sd->s_type & CONFIGFS_ITEM_ATTR) {
> + if (sd->s_type & (CONFIGFS_ITEM_ATTR | CONFIGFS_ITEM_BIN_ATTR)) {
I would also recomend a static inline helper here instead of adding this
or as this may simplify the code in a few places.
Best regards,
--
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
--
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