* Add FIEMAP_EXTENT_SHARED flag
@ 2009-12-03 20:46 Sunil Mushran
2009-12-03 20:46 ` [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED Sunil Mushran
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Sunil Mushran @ 2009-12-03 20:46 UTC (permalink / raw)
To: akpm; +Cc: linux-fsdevel, linux-kernel, ocfs2-devel
Andrew,
Please could you Ack this patch. This adds a new FIEMAP flag to denote
shared extents which we are using to identify such exents in reflinked
files.
Thanks
Sunil
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED
2009-12-03 20:46 Add FIEMAP_EXTENT_SHARED flag Sunil Mushran
@ 2009-12-03 20:46 ` Sunil Mushran
2009-12-03 20:46 ` [PATCH 2/2] ocfs2: Use FIEMAP_EXTENT_SHARED Sunil Mushran
2009-12-18 5:10 ` [Ocfs2-devel] Add FIEMAP_EXTENT_SHARED flag Joel Becker
2 siblings, 0 replies; 9+ messages in thread
From: Sunil Mushran @ 2009-12-03 20:46 UTC (permalink / raw)
To: akpm; +Cc: linux-fsdevel, linux-kernel, ocfs2-devel
Patch adds flag FIEMAP_EXTENT_SHARED to denote extents that are
shared with other inodes.
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
---
include/linux/fiemap.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/linux/fiemap.h b/include/linux/fiemap.h
index 934e22d..d830747 100644
--- a/include/linux/fiemap.h
+++ b/include/linux/fiemap.h
@@ -62,5 +62,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 */
--
1.5.6.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] ocfs2: Use FIEMAP_EXTENT_SHARED
2009-12-03 20:46 Add FIEMAP_EXTENT_SHARED flag Sunil Mushran
2009-12-03 20:46 ` [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED Sunil Mushran
@ 2009-12-03 20:46 ` Sunil Mushran
2009-12-18 5:10 ` [Ocfs2-devel] Add FIEMAP_EXTENT_SHARED flag Joel Becker
2 siblings, 0 replies; 9+ messages in thread
From: Sunil Mushran @ 2009-12-03 20:46 UTC (permalink / raw)
To: akpm; +Cc: linux-fsdevel, linux-kernel, ocfs2-devel
Adds FIEMAP_EXTENT_SHARED flag to refcounted extents.
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
---
fs/ocfs2/extent_map.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c
index 843db64..cdce5f8 100644
--- a/fs/ocfs2/extent_map.c
+++ b/fs/ocfs2/extent_map.c
@@ -786,6 +786,8 @@ int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
fe_flags = 0;
if (rec.e_flags & OCFS2_EXT_UNWRITTEN)
fe_flags |= FIEMAP_EXTENT_UNWRITTEN;
+ if (rec.e_flags & OCFS2_EXT_REFCOUNTED)
+ fe_flags |= FIEMAP_EXTENT_SHARED;
if (is_last)
fe_flags |= FIEMAP_EXTENT_LAST;
len_bytes = (u64)le16_to_cpu(rec.e_leaf_clusters) << osb->s_clustersize_bits;
--
1.5.6.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Ocfs2-devel] Add FIEMAP_EXTENT_SHARED flag
2009-12-03 20:46 Add FIEMAP_EXTENT_SHARED flag Sunil Mushran
2009-12-03 20:46 ` [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED Sunil Mushran
2009-12-03 20:46 ` [PATCH 2/2] ocfs2: Use FIEMAP_EXTENT_SHARED Sunil Mushran
@ 2009-12-18 5:10 ` Joel Becker
2009-12-18 21:24 ` Andreas Dilger
2 siblings, 1 reply; 9+ messages in thread
From: Joel Becker @ 2009-12-18 5:10 UTC (permalink / raw)
To: Sunil Mushran; +Cc: akpm, linux-fsdevel, linux-kernel, ocfs2-devel
On Thu, Dec 03, 2009 at 12:46:50PM -0800, Sunil Mushran wrote:
> Please could you Ack this patch. This adds a new FIEMAP flag to denote
> shared extents which we are using to identify such exents in reflinked
> files.
These patches are now in ocfs2.git. If anyone has any concerns,
let me know.
Joel
--
Life's Little Instruction Book #464
"Don't miss the magic of the moment by focusing on what's
to come."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Ocfs2-devel] Add FIEMAP_EXTENT_SHARED flag
2009-12-18 5:10 ` [Ocfs2-devel] Add FIEMAP_EXTENT_SHARED flag Joel Becker
@ 2009-12-18 21:24 ` Andreas Dilger
2009-12-18 21:30 ` Sunil Mushran
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Dilger @ 2009-12-18 21:24 UTC (permalink / raw)
To: Joel Becker; +Cc: Sunil Mushran, linux-fsdevel, ocfs2-devel, ext4 development
On 2009-12-17, at 22:10, Joel Becker wrote:
> On Thu, Dec 03, 2009 at 12:46:50PM -0800, Sunil Mushran wrote:
>> Please could you Ack this patch. This adds a new FIEMAP flag to
>> denote
>> shared extents which we are using to identify such exents in
>> reflinked
>> files.
>
> These patches are now in ocfs2.git. If anyone has any concerns,
> let me know.
Hi Joel,
are there any plans to submit an e2fsprogs patch to print out the
"shared" extent flag from "filefrag"?
At first glance it would also seem to make sense to set this flag for
ext2/3/4 xattrs that are sharing an external extent block.
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Extend FIEMAP to indicate shared extents
@ 2009-11-06 23:24 Sunil Mushran
2009-11-06 23:24 ` [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED Sunil Mushran
0 siblings, 1 reply; 9+ messages in thread
From: Sunil Mushran @ 2009-11-06 23:24 UTC (permalink / raw)
To: akpm, viro, hch; +Cc: linux-fsdevel, linux-kernel, ocfs2-devel
Please could I get your ACK for these patches.
This adds a FIEMAP extent flag, FIEMAP_EXTENT_SHARED, to indicate
extents that are shared by multiple files. The second patch makes
use of the same in the OCFS2 file system to show such extents in
the reflinked files.
Thanks
Sunil
^ permalink raw reply [flat|nested] 9+ messages in thread
* Extend FIEMAP to indicate shared extents
@ 2009-10-22 1:05 Sunil Mushran
2009-10-22 1:05 ` [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED Sunil Mushran
0 siblings, 1 reply; 9+ messages in thread
From: Sunil Mushran @ 2009-10-22 1:05 UTC (permalink / raw)
To: ocfs2-devel, linux-fsdevel, linux-kernel
This adds a FIEMAP extent flag, FIEMAP_EXTENT_SHARED, to indicate
extents that are shared by multiple files. The second patch makes
use of the same in the OCFS2 file system to show such extents in
the reflinked files.
Thanks
Sunil
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED
2009-10-22 1:05 Extend FIEMAP to indicate shared extents Sunil Mushran
@ 2009-10-22 1:05 ` Sunil Mushran
2009-10-23 18:00 ` [Ocfs2-devel] " Mark Fasheh
0 siblings, 1 reply; 9+ messages in thread
From: Sunil Mushran @ 2009-10-22 1:05 UTC (permalink / raw)
To: ocfs2-devel, linux-fsdevel, linux-kernel
Patch adds flag FIEMAP_EXTENT_SHARED to denote extents that are
shared with other inodes.
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
---
include/linux/fiemap.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/linux/fiemap.h b/include/linux/fiemap.h
index 934e22d..d830747 100644
--- a/include/linux/fiemap.h
+++ b/include/linux/fiemap.h
@@ -62,5 +62,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 */
--
1.6.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Ocfs2-devel] [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED
2009-10-22 1:05 ` [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED Sunil Mushran
@ 2009-10-23 18:00 ` Mark Fasheh
2009-10-24 18:30 ` Jamie Lokier
0 siblings, 1 reply; 9+ messages in thread
From: Mark Fasheh @ 2009-10-23 18:00 UTC (permalink / raw)
To: Sunil Mushran; +Cc: ocfs2-devel, linux-fsdevel, linux-kernel
On Wed, Oct 21, 2009 at 06:05:08PM -0700, Sunil Mushran wrote:
> Patch adds flag FIEMAP_EXTENT_SHARED to denote extents that are
> shared with other inodes.
This looks pretty sane to me. Thanks Sunil.
> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
--Mark
--
Mark Fasheh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Ocfs2-devel] [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED
2009-10-23 18:00 ` [Ocfs2-devel] " Mark Fasheh
@ 2009-10-24 18:30 ` Jamie Lokier
2009-10-26 17:29 ` Sunil Mushran
0 siblings, 1 reply; 9+ messages in thread
From: Jamie Lokier @ 2009-10-24 18:30 UTC (permalink / raw)
To: Mark Fasheh; +Cc: Sunil Mushran, ocfs2-devel, linux-fsdevel, linux-kernel
Mark Fasheh wrote:
> On Wed, Oct 21, 2009 at 06:05:08PM -0700, Sunil Mushran wrote:
> > Patch adds flag FIEMAP_EXTENT_SHARED to denote extents that are
> > shared with other inodes.
>
> This looks pretty sane to me. Thanks Sunil.
It might be better to have a flag FIEMAP_EXTENT_NOT_SHARED.
Apps which need to know the data is not shared can't safely check
!(flags & FIEMAP_EXTENT_SHARED) because of old kernels which don't set
the flag.
-- Jamie
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED
2009-10-24 18:30 ` Jamie Lokier
@ 2009-10-26 17:29 ` Sunil Mushran
0 siblings, 0 replies; 9+ messages in thread
From: Sunil Mushran @ 2009-10-26 17:29 UTC (permalink / raw)
To: Jamie Lokier; +Cc: linux-fsdevel, Mark Fasheh, linux-kernel, ocfs2-devel
Jamie Lokier wrote:
> It might be better to have a flag FIEMAP_EXTENT_NOT_SHARED.
>
> Apps which need to know the data is not shared can't safely check
> !(flags & FIEMAP_EXTENT_SHARED) because of old kernels which don't set
> the flag.
I'm probably not understanding your point. Won't the older kernels not set
FIEMAP_EXTENT_NOT_SHARED too.
If this is important, we could always add this flag in the stable kernel
trees. Both sharing of extents and fiemap are relatively new to the kernel.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-12-18 21:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-03 20:46 Add FIEMAP_EXTENT_SHARED flag Sunil Mushran
2009-12-03 20:46 ` [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED Sunil Mushran
2009-12-03 20:46 ` [PATCH 2/2] ocfs2: Use FIEMAP_EXTENT_SHARED Sunil Mushran
2009-12-18 5:10 ` [Ocfs2-devel] Add FIEMAP_EXTENT_SHARED flag Joel Becker
2009-12-18 21:24 ` Andreas Dilger
2009-12-18 21:30 ` Sunil Mushran
-- strict thread matches above, loose matches on Subject: below --
2009-11-06 23:24 Extend FIEMAP to indicate shared extents Sunil Mushran
2009-11-06 23:24 ` [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED Sunil Mushran
2009-10-22 1:05 Extend FIEMAP to indicate shared extents Sunil Mushran
2009-10-22 1:05 ` [PATCH 1/2] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED Sunil Mushran
2009-10-23 18:00 ` [Ocfs2-devel] " Mark Fasheh
2009-10-24 18:30 ` Jamie Lokier
2009-10-26 17:29 ` Sunil Mushran
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).