linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Rootdir refactor and small bug fixes
@ 2017-10-18  8:00 Qu Wenruo
  2017-10-18  8:00 ` [PATCH 1/5] btrfs-progs: Avoid BUG_ON for chunk allocation when ENOSPC happens Qu Wenruo
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Qu Wenruo @ 2017-10-18  8:00 UTC (permalink / raw)
  To: linux-btrfs; +Cc: dsterba

First 3 patches are small bug fixes which can be applied even we don't
touch the functionality of --rootdir.

The last two patches will refactor --rootdir related functions (mainly
size_sourcedir and make_image) to mkfs/rootdir.[ch].
And rename them to btrfs_mkfs_size_dir() and btrfs_mkfs_fill_dir()
respectively.
Functionality is not changed at all, so it will still shrink the device
or using the first 1M reserved space.

This moved about 700 lines, which reduced about 1/3 of original mkfs.c.

And by moving this ancient code to its own files, I also fixed several
small nits exposed by checkpatch script.

This provides a clean environment for later rootdir rework.

Qu Wenruo (5):
  btrfs-progs: Avoid BUG_ON for chunk allocation when ENOSPC happens
  btrfs-progs: mkfs: Fix overwritten return value for mkfs
  btrfs-progs: mkfs: Error out gracefully for --rootdir
  btrfs-progs: mkfs: Move image creation of rootdir to its own files
  btrfs-progs: mkfs: Move source dir size calculation to its own files

 Makefile       |   4 +-
 extent-tree.c  |   3 +-
 mkfs/main.c    | 710 +------------------------------------------------------
 mkfs/rootdir.c | 735 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 mkfs/rootdir.h |  32 +++
 volumes.c      |  18 +-
 6 files changed, 792 insertions(+), 710 deletions(-)
 create mode 100644 mkfs/rootdir.c
 create mode 100644 mkfs/rootdir.h

-- 
2.14.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-10-18 12:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18  8:00 [PATCH 0/5] Rootdir refactor and small bug fixes Qu Wenruo
2017-10-18  8:00 ` [PATCH 1/5] btrfs-progs: Avoid BUG_ON for chunk allocation when ENOSPC happens Qu Wenruo
2017-10-18  8:00 ` [PATCH 2/5] btrfs-progs: mkfs: Fix overwritten return value for mkfs Qu Wenruo
2017-10-18  8:00 ` [PATCH 3/5] btrfs-progs: mkfs: Error out gracefully for --rootdir Qu Wenruo
2017-10-18  8:00 ` [PATCH 4/5] btrfs-progs: mkfs: Move image creation of rootdir to its own files Qu Wenruo
2017-10-18  8:00 ` [PATCH 5/5] btrfs-progs: mkfs: Move source dir size calculation " Qu Wenruo
2017-10-18 12:23 ` [PATCH 0/5] Rootdir refactor and small bug fixes Nikolay Borisov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).