Confusing problem with FSMountLocalVolumeSync
Confusing problem with FSMountLocalVolumeSync
- Subject: Confusing problem with FSMountLocalVolumeSync
- From: "David Hazel" <email@hidden>
- Date: Mon, 20 Nov 2006 15:50:11 -0000
- Importance: Normal
I am having a rather
puzzling problem using FSMountLocalVolumeSync, and I wondered if anyone had any
suggestions about what might be causing this.
I have an
application which performs low-level write operations to FAT-formatted USB
memory sticks. There are two distinct functions within the application that do
this, and in both cases the same sequence of operations is done on the USB
drive:
1. Unmount the drive
using FSUnmountLocalVolumeSync
2. Write to the
device
3. Remount the drive
using FSMountLocalVolumeSync
The two pieces of
functionality are very similar in action, so have been written using almost
identical logic. In fact, the same piece of logic is used in both cases to
effect the unmount and the remount. However, one of these functions consistently
works exactly as expected, while the second consistently gives an error at step
3. The error given is either "No such file or directory" or "Bad file
descriptor". The parameters being passed to FSMountLocalVolumeSync are identical
(and correct) in both cases.
I have spent over 2
days trying to identify the root cause of this problem. I have ruled out memory
corruption and just about every other error or inconsistency I can think of. The
only clue is that the erroring function works fine if I comment out the logic
that writes to the device (i.e. step 2). This makes no sense to me, as the
function that does work also writes to the device yet does not give any
errors on remount.
Are there any known
circumstances when FSMountVolumeSync will fail, possibly related to an error
during a write operation?
Kind Regards,
David Hazel BSc, MSc,
MIAP
Enchaine Informatic Ltd
Tel: +44 (0)845 230
2324
Web: www.enchaine.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden