• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Blocked Reads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Blocked Reads


  • Subject: Re: Blocked Reads
  • From: Dave Camp <email@hidden>
  • Date: Wed, 17 Mar 2010 07:09:03 -0700

On Mar 17, 2010, at 6:49 AM, colors wrote:

> I am running into a problem with anti-virus software.  I need to be able to read a file from a USB CD and I need the read to actually go over the USB bus.
>
> I have been just doing fopen, fread, fclose, etc. and that all works; although, I do set the file to F_NOCACHE with fcntl to make sure that I read the file from the device and not a read cache.  I have also tried fpurge.
>
> Unfortunately, the AV software is getting in the way.  fread completes happily and gets the correct bytes, but the bytes did not travel across the USB bus.  It appears that the AV SW is doing its own cacheing and feeding me the bytes I ask for.

How do you know it's not going over the USB bus?

> I have also tried to use open, read, close.  They do get the data from across the bus, but they also have a side effect of the closing the IOKit service, which makes it look like the device was pulled out of the USB port.  Read also reports an I/O Error, even though the bytes are traveling across the bus.

Open, read and close are used by all sorts of software. If those did not work across the board with AV software installed I would expect the machine to be almost unusable.

> I have also considered making SCSI Read calls or USB Read calls, but it looks like I will only be allowed to do this if I make my own kext.

Were you to operate at the device level, you would be able to read physical blocks from the device, but I don't know how you would correlate those with the logical blocks of any given file. Thats what the filesystem does...

> Does anyone have any thoughts about 1) what the AV SW is doing?, and 2) how to get around what it is doing?
>
> BTY, I know of at least three AV products that cause this problem.

Posting some code showing how you are reading files might help.

Are your problems limited to USB CD drives? Does your code work when the CD is in the internal drive?

Dave

 _______________________________________________
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

  • Follow-Ups:
    • Re: Blocked Reads
      • From: colors <email@hidden>
References: 
 >Blocked Reads (From: colors <email@hidden>)

  • Prev by Date: Blocked Reads
  • Next by Date: Re: Blocked Reads
  • Previous by thread: Blocked Reads
  • Next by thread: Re: Blocked Reads
  • Index(es):
    • Date
    • Thread