Upgrade file system minifilter driver

I have a file system mini-filter driver that I can install / uninstall through INF file similar to details available at :
https://docs.microsoft.com/en-us/windows-hardware/drivers/ifs/using-an-inf-file-to-install-a-file-system-filter-driver

https://docs.microsoft.com/en-us/windows-hardware/drivers/ifs/using-an-inf-file-to-uninstall-a-file-system-filter-driver

Is there any best-practice to be followed to upgrade such a driver ?

There could be 2 ways to go about it :

  1. Replace the on-disk .sys file for upgrades and let it take effect on reboot
  2. Uninstall the old version of the driver and install the new version. The issue here will be that for the short moment the driver is missing from the stack, the functionality that the driver provides will be unavailable and in cases where there is a continuity requirement (say, change block tracking) then that will be reset.

> Is there any best-practice to be followed to upgrade such a driver ?

I’d be interested in what people come back with.

For myself I usually just punt to the WiX DifX plugin and let the installer
wreak its magic, after all, shouldn’t it be guaranteeing the an ACID
upgrade?

If I was super conservative I would probably go for a
Schedule=“afterInstallExecute” and spend my life worrying that I had the
version rules right.

R

There’s no right answer for this. In my experience, customers hate to reboot
their systems so upgrading without a reboot is a nice feature. Whether or
not this makes sense to your product is another question (e.g. what will
your customers hate more: rebooting to update or re-seeding their cloud
backup because the CBT chain is broken?).

-scott
OSR
@OSRDrivers

Reboot vs no-reboot is one part and the priority there is definitely to not require an immediate reboot.

Since the File System Minifilter Driver is unload-load capable while the system is up and running (compared to Volume Class Filter Driver for similar CBT use case), the next question that arises is whether to break the incremental backup chain at the time of upgrade (by unloading and uninstalling the old driver, and installing and loading the new driver) or to replace the .sys file (assuming there have been no changes in the .inf and running on Windows Server 2012 R2) and let it take effect on whenever the next unload-load happens (which in a Server environment will generally be on System Reboot).

in the past once we had had an elaborate solution to this exact problem.
extend the mini filter to have it’s own export driver plugins, move teh
business logic to that plugin, and make the actual mini filter as thin as
possible. then at upgrade time, loadn ad relaod the plugin instead of the
entiire driver causing teh upgrade. Yes, the inflight IO was queued up in
the base mini filter during the plugin upgrade, and then replayed back once
teh plugin was up and running in ‘catchup’ mode.

it is a LOT of work, and has several issues to be considered:

  1. how long will you hold on IO, what if the plugin never loads or doesnt
    load in a timely manner.
  2. the io throughput of machines vary, on a busy server a second of holding
    IO can be a huge performace hitback.
  3. many others…

On Sun, Oct 29, 2017 at 11:52 PM, xxxxx@gmail.com <
xxxxx@lists.osr.com> wrote:

Reboot vs no-reboot is one part and the priority there is definitely to
not require an immediate reboot.

Since the File System Minifilter Driver is unload-load capable while the
system is up and running (compared to Volume Class Filter Driver for
similar CBT use case), the next question that arises is whether to break
the incremental backup chain at the time of upgrade (by unloading and
uninstalling the old driver, and installing and loading the new driver) or
to replace the .sys file (assuming there have been no changes in the .inf
and running on Windows Server 2012 R2) and let it take effect on whenever
the next unload-load happens (which in a Server environment will generally
be on System Reboot).


NTFSD is sponsored by OSR

MONTHLY seminars on crash dump analysis, WDF, Windows internals and
software drivers!
Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
>



- ab</http:>