Accepting request 231951 from home:mfasheh:branches:filesystems
- Add filefrag-print-shared-extent-flag.patch: lets filefrag print shared extent flag when it gets it. Helps with fate#316317 / bnc#868847. Patch sent to upstream 4/17/2014. OBS-URL: https://build.opensuse.org/request/show/231951 OBS-URL: https://build.opensuse.org/package/show/filesystems/e2fsprogs?expand=0&rev=54
This commit is contained in:
parent
261e8dd38f
commit
6a7f9ee972
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 28 17:45:46 UTC 2014 - mfasheh@suse.com
|
||||||
|
|
||||||
|
- Add filefrag-print-shared-extent-flag.patch: lets filefrag print shared
|
||||||
|
extent flag when it gets it. Helps with fate#316317 / bnc#868847. Patch
|
||||||
|
sent to upstream 4/17/2014.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 27 13:05:33 UTC 2014 - jack@suse.cz
|
Mon Jan 27 13:05:33 UTC 2014 - jack@suse.cz
|
||||||
|
|
||||||
|
@ -76,8 +76,9 @@ Source4: e2fsck.conf
|
|||||||
# e2fsprogs patches
|
# e2fsprogs patches
|
||||||
#
|
#
|
||||||
Patch1: e2fsprogs-1.41.1-splash_support.patch
|
Patch1: e2fsprogs-1.41.1-splash_support.patch
|
||||||
|
Patch2: filefrag-print-shared-extent-flag.patch
|
||||||
# libcom_err patches
|
# libcom_err patches
|
||||||
Patch2: libcom_err-compile_et_permissions.patch
|
Patch3: libcom_err-compile_et_permissions.patch
|
||||||
Patch4: e2fsprogs-1.42-implicit_fortify_decl.patch
|
Patch4: e2fsprogs-1.42-implicit_fortify_decl.patch
|
||||||
Patch5: e2fsprogs-1.42-ext2fsh_implicit.patch
|
Patch5: e2fsprogs-1.42-ext2fsh_implicit.patch
|
||||||
# Do not suppress make commands
|
# Do not suppress make commands
|
||||||
@ -189,8 +190,9 @@ Development files for the com_err error message display library.
|
|||||||
%setup -q -n e2fsprogs-%{version}
|
%setup -q -n e2fsprogs-%{version}
|
||||||
# e2fsprogs patches
|
# e2fsprogs patches
|
||||||
%patch1
|
%patch1
|
||||||
# libcom_err patches
|
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
# libcom_err patches
|
||||||
|
%patch3 -p1
|
||||||
%patch4
|
%patch4
|
||||||
%patch5
|
%patch5
|
||||||
cp %{SOURCE2} .
|
cp %{SOURCE2} .
|
||||||
|
42
filefrag-print-shared-extent-flag.patch
Normal file
42
filefrag-print-shared-extent-flag.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 6a14c51d612184f2c09c5b4148abb6afbb2e1fb0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mark Fasheh <mfasheh@suse.de>
|
||||||
|
Date: Thu, 17 Apr 2014 14:31:56 -0700
|
||||||
|
Subject: filefrag: print shared extent flag
|
||||||
|
|
||||||
|
Filefrag doesn't catch and print the shared extent flag. Add this for
|
||||||
|
users of filefrag on file systems with shared extents (such as btrfs).
|
||||||
|
|
||||||
|
Signed-off-by: Mark Fasheh <mfasheh@suse.de>
|
||||||
|
---
|
||||||
|
lib/ext2fs/fiemap.h | 2 ++
|
||||||
|
misc/filefrag.c | 2 ++
|
||||||
|
2 files changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/ext2fs/fiemap.h b/lib/ext2fs/fiemap.h
|
||||||
|
index 30bf555..895cd0b 100644
|
||||||
|
--- a/lib/ext2fs/fiemap.h
|
||||||
|
+++ b/lib/ext2fs/fiemap.h
|
||||||
|
@@ -64,5 +64,7 @@ struct fiemap {
|
||||||
|
#define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively
|
||||||
|
* support extents. Result
|
||||||
|
* merged for efficiency. */
|
||||||
|
+#define FIEMAP_EXTENT_SHARED 0x00002000 /* Space shared with other
|
||||||
|
+ * files. */
|
||||||
|
|
||||||
|
#endif /* _LINUX_FIEMAP_H */
|
||||||
|
diff --git a/misc/filefrag.c b/misc/filefrag.c
|
||||||
|
index a050a22..929a33b 100644
|
||||||
|
--- a/misc/filefrag.c
|
||||||
|
+++ b/misc/filefrag.c
|
||||||
|
@@ -165,6 +165,8 @@ static void print_extent_info(struct fiemap_extent *fm_extent, int cur_ex,
|
||||||
|
strcat(flags, "unwritten,");
|
||||||
|
if (fm_extent->fe_flags & FIEMAP_EXTENT_MERGED)
|
||||||
|
strcat(flags, "merged,");
|
||||||
|
+ if (fm_extent->fe_flags & FIEMAP_EXTENT_SHARED)
|
||||||
|
+ strcat(flags, "shared,");
|
||||||
|
|
||||||
|
if (fm_extent->fe_logical + fm_extent->fe_length >= (__u64) st->st_size)
|
||||||
|
strcat(flags, "eof,");
|
||||||
|
--
|
||||||
|
1.8.4
|
||||||
|
|
Loading…
Reference in New Issue
Block a user