All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] e2fsprogs: clean up ext2fs_bg_flags_ interfaces
Date: Mon, 5 Oct 2009 07:51:02 -0400	[thread overview]
Message-ID: <20091005115102.GC13512@mit.edu> (raw)
In-Reply-To: <4AA7FC13.6060109@redhat.com>

On Wed, Sep 09, 2009 at 02:03:47PM -0500, Eric Sandeen wrote:
> The ext2fs_bg_flag* functions were confusing.
>
> Currently we have this:
>
> void ext2fs_bg_flags_set(ext2_filsys fs, dgrp_t group, __u16 bg_flags);
> void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group,__u16 bg_flags);
>
> (_set (unused) sets exactly bg_flags; _clear clears all and ignores bg_flags)
>
> and these, which can twiddle individual bits in bg_flags:
>
> void ext2fs_bg_flag_set(ext2_filsys fs, dgrp_t group, __u16 bg_flag);
> void ext2fs_bg_flag_clear(ext2_filsys fs, dgrp_t group, __u16 bg_flag);
>
> A better interface, after the patch below, is just:
>
> ext2fs_bg_flags_zap(fs, group) /* zeros bg_flags */
> ext2fs_bg_flags_set(fs, group, flags) /* adds flags to bg_flags */
> ext2fs_bg_flags_clear(fs, group, flags) /* clears flags in bg_flags */
>

Applied.  I also (for consistency's sake) converted
ext2fs_bg_flag_test() to ext2fs_bg_flags_test() in a separate commit.

							- Ted

      parent reply	other threads:[~2009-10-05 11:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09 19:03 [PATCH] e2fsprogs: clean up ext2fs_bg_flags_ interfaces Eric Sandeen
2009-09-09 19:19 ` Nick Dokos
2009-09-09 19:26   ` Eric Sandeen
2009-10-05 11:51 ` Theodore Tso [this message]

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=20091005115102.GC13512@mit.edu \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.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.