lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 May 2007 10:56:03 +0100
From:	Anton Altaparmakov <aia21@....ac.uk>
To:	David Chinner <dgc@....com>
Cc:	Andreas Dilger <adilger@...sterfs.com>, linux-ext4@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, xfs@....sgi.com, hch@...radead.org
Subject: Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

On 2 May 2007, at 10:48, David Chinner wrote:
> On Wed, May 02, 2007 at 09:23:38AM +0100, Anton Altaparmakov wrote:
>> On a different issue, do you think it would be worth adding an option
>> flags like FIEMAP_DONT_RELOCATE or something similar that would be a
>> compulsory flag and if set the FS is not allowed to move the file
>> around/change the block allocation of the file.
>
> We already have an inode flag in XFS to say this - the defrag
> tool checks it and ignores the file if it is set.

That is great for XFS but you control the metadata.  NTFS, HFS, etc  
are cases where we cannot add such a flag because we cannot modify  
the metadata format (ok we could in some kludgy manner like storing  
an EA with an inode to say "com.linux.ntfs.immutable" or something  
but I would rather not if I can avoid it).

>> Or alternatively a flag like FIEMAP_MAKE_DIRECT or something to tell
>> the FS we want to access the actual raw blocks so the FS can make
>> sure the data is on block aligned boundaries and if the FS does not
>> support this (e.g. ZFS or a compressed or encrypted NTFS file) then
>> it can return -ENOTSUP.
>>
>> Perhaps this is totally the wrong interface and such a "prepare file
>> for direct access" API should be a different ioctl() or syscall or
>> whatever.  It just seems very simple and appropriate to combine it
>> here as people who use FIEMAP are at least sometimes going to be
>> wanting to access those blocks directly as well and it feels right to
>> be able to communicate this to the FS in the same call, kind of like
>> an "open intent" of "I want to use the data directly on disk"...
>
> I think this is wrong interface for this. Sure, use it to get the
> mappings (that's what it's for) but what you do with the mappings
> after that is not part of FIEMAP....

Thanks for the comments.  I am not sure it is a good idea either,  
just thought it would be worth discussing in case people thought it a  
good idea.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/


-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ