On Thu, Oct 20, 2016 at 08:00:05PM -0700, Darrick J. Wong wrote: > > > > For btrfs, dedupe will just return 0 and check nothing, while for xfs > > > > len == 0 means to check the whole file length. > > > > > > > > Both makes sense for me, for btrfs len = 0 behavior, it just follows > > > > read/write functions. > > > > And I assume xfs follows reflink behavior, when len is not specified, > > > > then reflink the length of src file. > > Yes. > > > > > But since it's a generic test, we need to unify the behavior. > > > > > > > > So, which one is the standard and which document should we follow for > > > > such behavior definition? > > <shrug> I suppose since it'll stop deduping at the first non-matching range, > there's not a lot of point in having "dedupe to wherever is the end of the > file" feature. > > (Also, if he hasn't already, I'm sure Christoph will point out that we > shouldn't really go changing the interface after the fact, even if the > interface was mostly undocumented and afaict not tested by anything like > xfstests for years...) Yes, I'd prefer to stick to the btrfs behavior when XFS follow their existing interface, unlesss said interface is clearly acknodged to be broken by the original developers. Now a 0 len as whole file sounds very useful, but I would prefer to get an explicit buying from the btrfs crowd, and have btrfs implement it properly first. -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html