[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH [libparted]: avoid unnecessary open() / close() on commit()

From: Hans de Goede
Subject: PATCH [libparted]: avoid unnecessary open() / close() on commit()
Date: Thu, 27 Aug 2009 20:16:09 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090806 Fedora/3.0-3.7.b3.fc12 Thunderbird/3.0b3

Hi all,

Currently when calling commit() on a ped_disk, the following happens:
open /dev/sda
write partition table
close /dev/sda
open /dev/sda
close /dev/sda

This is rather inefficient, and causes 2 udev change events to be fired
for /dev/sda (+ the change events from the BLKRRPART), causing all kind
of scanning (blkid & friends) twice.

The attached patch fixes things to only open the device once.



Attachment: parted-1.9.0-commit-without-close.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]