NetBSD-Users archive

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

UFS fragments



I've been studying ffs_alloc.c in the kernel source. I was trying to 
understand how the logical block allocation in UFS works. I never actually 
knew about "fragments". I get why they are there, but I have some 
questions if anyone has time:

* I notice that fragments can be re-allocated. Could that create 
  fragmentation issues ? Is there a way to change allocations so that 
  they are physically contiguous? Not that this matters much anymore. I'm 
  just curious if it was ever an issue. 

* I see "cred" (type kauth_cred_t) being passed around a lot in the API 
  calls. What is that doing? Aren't all these calls already going to be 
  operating as root? I couldn't find the meaning of "NOCRED" in 
  /usr/include/*.h or significant info related to kauth_cred_t but I'm 
  probably just looking in the wrong places. I'm thinking this is puffs 
  related, but I didn't think puffs and UFS knew each other.

* I see some code that seem to be related to spinning rust. Like this 
  line: 
  " *   2) allocate a rotationally optimal block in the same cylinder."

  Are there many opportunities for optimizing for SSD, nowadays, or is it 
  just too much trouble for not enough payoff?

I'm not a kernel dev, so please bear with my ignorance. I'm just wandering 
through the code. 

-Swift


Home | Main Index | Thread Index | Old Index