On Thu, 14 Aug 2008, Arjan van de Ven wrote:I'm not sure. there are two situations (with the transition between them) 1. unscanned system, we want to do everything. (this happens immediatly after a new signature file is deployed) here you do just want to filter out the files that have been scanned from the list of everything, and you probably want to check at the time of scanning the file in case it was opened (and scanned) in the meantime. 2. mostly scanned system, we only want to scan files that have been dirtied. here you don't need to scan everything, you only need to scan in two cases 2a. the file was dirtied (you learn about it and add it to the queue of files to scan when you get around to it) 2b. an unscanned file is opened (the library detects that the file was not marked approved by all the current scanners, so it invokes the scanners on this file before completing the open, or copy for mmap, or whatever) In the first case the attributes work "don't bother scanning me". In the second case they also work (becouse you aren't trying to scan everything) the only time there is a headache is in the transition between them when you have scanned a lot of the system, but not all of it, and the machine was rebooted so you lost track of what you had scanned. it shouldn't be too hard to deal with this. even if you never resume the scan you are still safe (becouse of the scan-on-open), but it's also possible to either do a find f(or equivalent) or files without the attribute and store the results (similar to updatedb) and then updating the file to mark the files as being scanned (update in place, change the first character or something to be fairly crash safe). after the full list of files has been scanned shift to the second mode. the sweep scan should be a background task, possibly disabled when on battery power. why would this not satisfy the requirements? David Lang --
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Linux 2.6.25-rc4 |
| Greg KH | Linux 2.6.25.10 |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Ilpo Järvinen | Re: Strange Application bug, race in MSG_PEEK complaints (was: Bug#513695: fetchma... |
