History log of /haiku-fatelf/src/add-ons/kernel/file_systems/fat/dosfs.c
Revision Date Author Comments
# f53ec236 02-Mar-2011 Jérôme Duval <korli@users.berlios.de>

changed ioctl hook return code when the opcode isn't supported.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40784 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d63f4274 18-Oct-2010 Jérôme Duval <korli@users.berlios.de>

added a file system call preallocate() as described in #6285, currently unused


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39006 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9d570af7 24-May-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed the type of the "op" parameter of the fs_vnode_ops::ioctl() hook and
the _kern_ioctl() syscall from ulong to uint32.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36927 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bb1d98b6 09-Apr-2010 Michael Lotz <mmlr@mlotz.ch>

* The volume init wasn't checked, so a failed init would crash.
* Unlocking a removable drive was done in the wrong error label which would've
resulted in accessing deadbeef due to the volume being freed just before its
use or using the not initialized volume variable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36103 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a791687e 19-Feb-2010 Axel Dörfler <axeld@pinc-software.de>

* Applied slightly cleaned up patch by romain that sanitizes the volume names.
* This closes bug #4602.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5266a735 23-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Applied patch by romain. Through refactoring, the volume name is already
retrieved before a volume is actually mounted and this fixes #4602. I have
applied the patch as is, although it contains some minor coding style violations,
since these have been there before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35262 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3f1684d9 29-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Removed the superfluous "magic" stuff - if structures are broken, then please
let it crash!
* Made some headers self-contained.
* Always lock, regardless of "reenter" (we're using a recursive lock, so this
doesn't matter at all).
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31913 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 152d6bdc 27-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Replaced diri_mark_dirty() with a diri_make_writable(), and fixed its usage
throughout the code.
* Got rid of the transactions - they weren't really used, and thus only created
unnecessary overhead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31836 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b5aac499 26-Jun-2009 Michael Lotz <mmlr@mlotz.ch>

* Cleanup.
* The active fat field is valid if fats aren't mirrored, not the other way
around.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31257 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9bed204d 24-May-2009 Bruno G. Albuquerque <bga@bug-br.org.br>

- Remove left-over debug output.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30838 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5850567a 24-May-2009 Bruno G. Albuquerque <bga@bug-br.org.br>

- Fix renaming a FAT volume.

Note that this does not fix the fact that the volume name can be in the bpb or
in a diri. The dosfs_identify_partition() only returns the label in the bpb so
more usually than not it will show one name in Tracker's mount menu and a
different name when mounted.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30837 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3553f323 14-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Allow a sector size of 4096 as well; this change allows Haiku to mount an
iPod.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30159 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 057f999d 13-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a flag B_DISK_SYSTEM_SUPPORTS_WRITING to determine whether or not a
file system can write to files before mounting.
* Set the flag for all file systems that actually can write.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28055 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ec598fe4 27-Jul-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added FS interface hooks io() and cancel_io(). The former is supposed
to provide asynchrounous (or only synchronous, if asynchronous is not
supported) I/O request support. It will eventually replace
{read,write}_pages(). None of the FS implementations implement them
yet.
* Implemented some support functions for request-based I/O. File system
implementations can use do_fd_io() which passes an I/O request to the
layer responsible for a given FD, and do_iterative_fd_io(), which
translates a request for a file to subrequests for the underlying
device and passes them on. Both fall back to synchrounous processing
when the io() hook is not supported.
Furthermore added vfs_synchronous_io() which should be handy for the
devfs to perform io_requests synchronously for devices that don't
support the io() hook.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26655 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cba41147 06-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* Unify reading the FAT volume label. One of two places didn't yet handle FAT32
volume labels at all.
* Use the common function in both identifying and mounting the volume so the
name is in sync between what the disk device manager got through scanning and
what Tracker gets through reading the fs stat.
* Strip trailing spaces from volume names in all places.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25828 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0f5179a 28-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changed recursive_lock to use a mutex instead of a semaphore.
* Adjusted code using recursive locks respectively. The initialization
cannot fail anymore, and it is possible to use recursive locks in the
early boot process (even uninitialized, if in BSS), which simplifies
things a little.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25687 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1da9f5ce 10-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Added BDiskSystem::ShortName() and everything needed to get it there.
* Added BDiskDeviceRoster::GetDiskSystem() method, that can get a disk system
by short/pretty/module name - since they should all be unique, I put them
in a single namespace, please complain if you don't like that :-)
* Cleaned up DiskSystem.h and DiskDeviceRoster.h according to the updated
header guidelines.
* Renamed ntfs pretty name from "ntfs File System" to "Windows NT File System".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25414 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ba575e42 17-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

Add support for detecting FAT32 volume labels.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24996 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8c45ca1 17-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

Just a bit of cleanup, remove trailing whitespace mostly. No functional changes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24995 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 72010d42 16-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

* Ported the FAT filesystem to the recent filesystem interface changes which
was, thanks to the detailed instructions from Ingo, quite doable.
* Ported the (deprecated and now publically removed) notify_listener() calls
to the respective new notify_* calls.
* Fixed debug build.
* Added the FAT filesystem back to the image.

I only tested the filesystem briefly and everything seemed to work as expected
(mounted the FAT part of my bootable Haiku memory stick, opened a few files
and copied something to it). At least it should not be any more broken than
before the interface changes ;-).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24987 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e97e022a 26-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

* block_cache_set_dirty() was used incorrectly; I wonder why I write any
documentation... when you ask the block cache for a writable block, it's
automatically dirty.
* This fixes bug #1330.
* Minor style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22317 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 42cd7306 26-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

Renamed "dos" file system to "fat".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22316 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f53ec236e22695929663822b4050b3cfe9a10c09 02-Mar-2011 Jérôme Duval <korli@users.berlios.de>

changed ioctl hook return code when the opcode isn't supported.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40784 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d63f4274b665d32065f24a7a01a025578c8a43c9 18-Oct-2010 Jérôme Duval <korli@users.berlios.de>

added a file system call preallocate() as described in #6285, currently unused


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39006 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9d570af7c878ba30043b23e6dce5f3ae5578aa7c 24-May-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed the type of the "op" parameter of the fs_vnode_ops::ioctl() hook and
the _kern_ioctl() syscall from ulong to uint32.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36927 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bb1d98b68777f621f19530c3d17ba2b241b3c4c2 09-Apr-2010 Michael Lotz <mmlr@mlotz.ch>

* The volume init wasn't checked, so a failed init would crash.
* Unlocking a removable drive was done in the wrong error label which would've
resulted in accessing deadbeef due to the volume being freed just before its
use or using the not initialized volume variable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36103 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a791687e90fbc26a80113b200ba8bf05f94d6118 19-Feb-2010 Axel Dörfler <axeld@pinc-software.de>

* Applied slightly cleaned up patch by romain that sanitizes the volume names.
* This closes bug #4602.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5266a7352042305c84f8aaddb4db9cd0494b4453 23-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Applied patch by romain. Through refactoring, the volume name is already
retrieved before a volume is actually mounted and this fixes #4602. I have
applied the patch as is, although it contains some minor coding style violations,
since these have been there before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35262 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3f1684d92cbcc9b678a06b88fba1743d3094efea 29-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Removed the superfluous "magic" stuff - if structures are broken, then please
let it crash!
* Made some headers self-contained.
* Always lock, regardless of "reenter" (we're using a recursive lock, so this
doesn't matter at all).
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31913 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 152d6bdcca40a929571db03a74ceb13b0c946ead 27-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Replaced diri_mark_dirty() with a diri_make_writable(), and fixed its usage
throughout the code.
* Got rid of the transactions - they weren't really used, and thus only created
unnecessary overhead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31836 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b5aac499d54d5ee89b951cd18a7f0fe35ff1abf4 26-Jun-2009 Michael Lotz <mmlr@mlotz.ch>

* Cleanup.
* The active fat field is valid if fats aren't mirrored, not the other way
around.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31257 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9bed204d78b57ea6a5aee149296bcb0fad082c79 24-May-2009 Bruno G. Albuquerque <bga@bug-br.org.br>

- Remove left-over debug output.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30838 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5850567a72f1cf604fae3465c30f4c021574bae1 24-May-2009 Bruno G. Albuquerque <bga@bug-br.org.br>

- Fix renaming a FAT volume.

Note that this does not fix the fact that the volume name can be in the bpb or
in a diri. The dosfs_identify_partition() only returns the label in the bpb so
more usually than not it will show one name in Tracker's mount menu and a
different name when mounted.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30837 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3553f323a68a2e11f7b29d41e79704e4e65381fa 14-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Allow a sector size of 4096 as well; this change allows Haiku to mount an
iPod.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30159 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 057f999da63f5d006591b41a284c0cd50ccbb042 13-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a flag B_DISK_SYSTEM_SUPPORTS_WRITING to determine whether or not a
file system can write to files before mounting.
* Set the flag for all file systems that actually can write.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28055 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ec598fe493579e3d522453cb407ca3c6b57d715a 27-Jul-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added FS interface hooks io() and cancel_io(). The former is supposed
to provide asynchrounous (or only synchronous, if asynchronous is not
supported) I/O request support. It will eventually replace
{read,write}_pages(). None of the FS implementations implement them
yet.
* Implemented some support functions for request-based I/O. File system
implementations can use do_fd_io() which passes an I/O request to the
layer responsible for a given FD, and do_iterative_fd_io(), which
translates a request for a file to subrequests for the underlying
device and passes them on. Both fall back to synchrounous processing
when the io() hook is not supported.
Furthermore added vfs_synchronous_io() which should be handy for the
devfs to perform io_requests synchronously for devices that don't
support the io() hook.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26655 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cba41147efb0173138b76a959705ef822777ca58 06-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* Unify reading the FAT volume label. One of two places didn't yet handle FAT32
volume labels at all.
* Use the common function in both identifying and mounting the volume so the
name is in sync between what the disk device manager got through scanning and
what Tracker gets through reading the fs stat.
* Strip trailing spaces from volume names in all places.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25828 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0f5179aa51eb680cdeea656a8b11fdbc6b56d63 28-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changed recursive_lock to use a mutex instead of a semaphore.
* Adjusted code using recursive locks respectively. The initialization
cannot fail anymore, and it is possible to use recursive locks in the
early boot process (even uninitialized, if in BSS), which simplifies
things a little.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25687 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1da9f5cea5ea4d32c539a01cd94a7b605e941beb 10-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Added BDiskSystem::ShortName() and everything needed to get it there.
* Added BDiskDeviceRoster::GetDiskSystem() method, that can get a disk system
by short/pretty/module name - since they should all be unique, I put them
in a single namespace, please complain if you don't like that :-)
* Cleaned up DiskSystem.h and DiskDeviceRoster.h according to the updated
header guidelines.
* Renamed ntfs pretty name from "ntfs File System" to "Windows NT File System".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25414 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ba575e420d6d0da3df6f4394e65d89670c8b301c 17-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

Add support for detecting FAT32 volume labels.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24996 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8c45ca140b174e2dc3053a7d0ed7f40e3281824 17-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

Just a bit of cleanup, remove trailing whitespace mostly. No functional changes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24995 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 72010d4247cca17efe8bc5a231569f5a1d8299d7 16-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

* Ported the FAT filesystem to the recent filesystem interface changes which
was, thanks to the detailed instructions from Ingo, quite doable.
* Ported the (deprecated and now publically removed) notify_listener() calls
to the respective new notify_* calls.
* Fixed debug build.
* Added the FAT filesystem back to the image.

I only tested the filesystem briefly and everything seemed to work as expected
(mounted the FAT part of my bootable Haiku memory stick, opened a few files
and copied something to it). At least it should not be any more broken than
before the interface changes ;-).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24987 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e97e022aa7b0d38913d4e1cbcb91d0f44a069063 26-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

* block_cache_set_dirty() was used incorrectly; I wonder why I write any
documentation... when you ask the block cache for a writable block, it's
automatically dirty.
* This fixes bug #1330.
* Minor style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22317 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 42cd7306a81f02f0b2d7d3ac7761a55156d0188f 26-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

Renamed "dos" file system to "fat".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22316 a95241bf-73f2-0310-859d-f6bbb57e9c96