All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Opasiak <k.opasiak@samsung.com>
To: Christoph Hellwig <hch@lst.de>,
	jlbec@evilplan.org, akpm@linux-foundation.org,
	nab@linux-iscsi.org
Cc: pantelis.antoniou@konsulko.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] configfs: implement binary attributes
Date: Wed, 30 Dec 2015 00:37:11 +0100	[thread overview]
Message-ID: <56831927.50205@samsung.com> (raw)
In-Reply-To: <1450968671-13699-2-git-send-email-hch@lst.de>



W dniu 2015-12-24 o 15:51, Christoph Hellwig pisze:
> From: Pantelis Antoniou <pantelis.antoniou@konsulko.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@konsulko.com>
> [hch: folded a fix from Geert Uytterhoeven <geert+renesas@glider.be>]
> Signed-off-by: Christoph Hellwig <hch@lst.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

  parent reply	other threads:[~2015-12-29 23:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24 14:51 a configfs update for 4.5, and the configfs tree question Christoph Hellwig
2015-12-24 14:51 ` [PATCH] configfs: implement binary attributes Christoph Hellwig
2015-12-29 23:00   ` Joel Becker
2015-12-29 23:26     ` Krzysztof Opasiak
2015-12-30  8:51     ` Pantelis Antoniou
2015-12-29 23:37   ` Krzysztof Opasiak [this message]
2015-12-29 23:05 ` a configfs update for 4.5, and the configfs tree question Joel Becker
2016-01-04 11:51   ` Christoph Hellwig
2016-01-04 12:37     ` Fengguang Wu
2016-01-04 20:46     ` Stephen Rothwell
2016-01-05  4:04     ` Joel Becker
2016-01-06 17:31 ` Nicholas A. Bellinger
  -- strict thread matches above, loose matches on Subject: below --
2015-10-22 20:30 [PATCH] configfs: Implement binary attributes Pantelis Antoniou
2015-12-01 18:21 ` Christoph Hellwig
2015-12-18 11:20   ` Christoph Hellwig
2015-12-18 11:21     ` Pantelis Antoniou
2015-12-18 11:26       ` Christoph Hellwig
2015-12-18 11:27         ` Pantelis Antoniou
2015-12-18 14:31           ` Geert Uytterhoeven
2015-12-18 14:32             ` Pantelis Antoniou
2015-12-22 15:53             ` Christoph Hellwig
2015-12-22 15:56               ` Geert Uytterhoeven
2015-09-16 16:08 Pantelis Antoniou
2015-09-17  0:37 ` Christoph Hellwig
2015-09-17  6:29   ` Pantelis Antoniou
2015-09-17 21:14     ` Christoph Hellwig
2014-06-22  9:37 Pantelis Antoniou
2014-06-25 12:52 ` Joel Becker
2014-06-25 12:58   ` Pantelis Antoniou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56831927.50205@samsung.com \
    --to=k.opasiak@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=jlbec@evilplan.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=pantelis.antoniou@konsulko.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.