Topic: Unnecessary device scan?

One of my ideas to improve GParted is to avoid unnecessary scans of devices.

Current practice is that after each command run a total scan of all devices is applied. This can cause lengthy delay times as some devices react very slowly or GParted has problems reading them, I don't know. If you split your work into many command runs for security, you may suffer most of your time with the tool in "wait-state"!

I don't think it is a necessary behaviour. It should, to layman's reason, suffice to scan only the affected devices after a command run, thus naturally slow devices which you likely never look at in GParted, won't cause you distress of wait-time. Also, such a modification is probably done in an eye-wink (if you are into it).


Re: Unnecessary device scan?

Minimizing disk access is a good idea to help improve responsiveness.  There are some good reasons for rescanning disks after operations, and this could probably be limited to recently modified or attached devices.  If you find that this is a trivial change then a patch would be appreciated.

A current work around to limit device scans is to start gparted from the command line and only provide the device path for the hard drive you are partitioning.  For example:

sudo gparted /dev/sda


Re: Unnecessary device scan?

Good idea! (work-around)
Lol, I'm not really into C and its low-level design spirit any more, and the many asterisks confuse my mind.
But I might have to for other reasons, so I would love to have a look at it provided you can give me a useful hint what file and methods to look at.
As I said: easy to modify for someone who is into it, not me. wink


Re: Unnecessary device scan?

The GParted development page is a good place to start.


Re: Unnecessary device scan?

When I see right, your Development page does not give a reference to the code-base or its hosting project.
Is that saying something?


Re: Unnecessary device scan?

madwolf wrote:

When I see right, your Development page does not give a reference to the code-base or its hosting project.
Is that saying something?

Did you find the Source Code Repository heading on the development page?


Re: Unnecessary device scan?

Ah thanks, I got it! - Must have hidden before my eyes!

8 (edited by madwolf 2013-10-20 12:44:33)

Re: Unnecessary device scan?

Checked out the clone, but running into problems when I try to follow your instructions to build in http://gparted.sourceforge.net/git.php#create-patch and subpages.
"./autogen.sh" renders "You need to install gnome-common". This case isn't mentioned.
I was calling "sudo apt-get build-dep gparted" before this.
I run Ubuntu 12.04. Any ideas?

Ok, I installed it. Perhaps worth to mention that gnome-common was missing.
Now I'm through with "make". If you just could tell me one thing:
Where exactly do I find the executable after make is finished?


Re: Unnecessary device scan?

After running "make", the gparted shell script will be in the same directory as the code, and the gpartedbin binary will be in the src directory.

After running "sudo make install", both the gparted shell script and gpartedbin binary will be stored in the sbin directory.  By default this is /usr/local/sbin, unless you specified a different directory when configuring the code.


Re: Unnecessary device scan?

This works well now I can quick scan my USB stick (sdb) and not have to wait for it to scan my multiple partitioned internal hard drive. Thanks gedakc


then type

gksu gparted /dev/sdb &