All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loic Dachary <loic@dachary.org>
To: Ceph Development <ceph-devel@vger.kernel.org>
Subject: chain_fsetxattr extra chunk removal
Date: Thu, 07 Feb 2013 21:59:16 +0100	[thread overview]
Message-ID: <511415A4.5050203@dachary.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 729 bytes --]

Hi,

While writing unit tests for chain_xattr.cc I tried to understand how to create the conditions to trigger this part of the chain_fsetxattr function:

  /* if we're exactly at a chunk size, remove the next one (if wasn't removed
     before) */
  if (ret >= 0 && chunk_size == CHAIN_XATTR_MAX_BLOCK_LEN) {
    get_raw_xattr_name(name, i, raw_name, sizeof(raw_name));
    int r = sys_fremovexattr(fd, raw_name);
    if (r < 0 && r != -ENODATA)
      ret = r;
  }

I suspect this cleans up extra empty attributes created as a side effect of a previous version of the function. Or I just don't understand the case it addresses.

I'd very much appreciate a hint :-)

-- 
Loïc Dachary, Artisan Logiciel Libre


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

             reply	other threads:[~2013-02-07 20:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 20:59 Loic Dachary [this message]
2013-02-11  5:13 ` chain_fsetxattr extra chunk removal Yehuda Sadeh
2013-02-11 20:08   ` Loic Dachary
2013-02-11 22:12     ` Loic Dachary

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=511415A4.5050203@dachary.org \
    --to=loic@dachary.org \
    --cc=ceph-devel@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.