All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lin <mlin@kernel.org>
To: linux-bcache@vger.kernel.org
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Subject: bcachefs xattr
Date: Thu, 13 Aug 2015 00:39:07 -0700	[thread overview]
Message-ID: <1439451547.5775.9.camel@hasee> (raw)

Hi Kent,

Seems the max length of xattr name+value is only 2004 bytes.
Why the limit of U8_MAX below?

root@bee:~# dd if=/dev/zero bs=1 count=1996 2>/dev/null | attr -s "long_attr" /mnt/test/attr.txt
attr_set: Numerical result out of range
Could not set "long_attr" for /mnt/test/attr.txt

183 int bch_xattr_set(struct inode *inode, const char *name,
...

230                 if (value) {
231                         struct keylist keys;
232                         struct bkey_i_xattr *xattr;
233                         unsigned u64s = BKEY_U64s +
234                                 DIV_ROUND_UP(sizeof(struct bch_xattr) +
235                                              qname.len + size,
236                                              sizeof(u64));
237 
238                         if (u64s > U8_MAX) {
239                                 ret = -ERANGE;
240                                 break;
241                         }

             reply	other threads:[~2015-08-13  7:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13  7:39 Ming Lin [this message]
2015-08-13  7:41 ` bcachefs xattr Kent Overstreet
2015-08-13  7:49   ` Ming Lin
2015-08-13  7:50     ` Kent Overstreet

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=1439451547.5775.9.camel@hasee \
    --to=mlin@kernel.org \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-bcache@vger.kernel.org \
    /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.