Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
The Management
Jan 2, 2010

sup, bitch?
sup, yospos?

today we will be looking at the fat filesystem. it’s called fat but it’s actually pretty skinny. file allocation table, or msdosfs, is an old tyme file system from back in the days when computers had no ram and floppies were a thing.

there are many versions of fat. well, not really versions because there isn’t actually any kind of standard, just random poo poo that evolved over the years.

fat12 - a 12-bit file system for tiny things like floppy disks and goon dicks.
fat16 - for when you want to go big. like, 32 MB with native sector size. or supersize your clusters for your massive storage on that new 600 MB scsi disc you stole from work.
fat32 - 2fat2furious. 32 bits of cluster addresses let you store so much data, your brain would melt. or get rid of the pesky internal fragmentation eating up valuable megabytes on your disk by going with small clusters.
exfat - some new horseshit, whatever.

some important things to know
a sector is 512 bytes. yes, bytes. sectors used to be the native hard drive storage size minimum unit.
a cluster is a bunch of sectors tied together. in powers of two. turns out sectors are small and dumb, you want at least 4kb chunks because your 386 cpu has 4k pages.
a file allocation table is a linked list, where every entry maps to one cluster on disk. the value in the entry either points to the address of the next entry or some other magic value. it’s extremely simple. fun fact, fat32 files are limited to 4gb, not because of limitations if the allocation table, but because the directory entry has a 32 bit size field. which is dumb as hell.

fat has short file names, or as we called them, file names. cool names like COMMAND.COM, IMG_0420.JPG, and COPYOF~1.DOC
short names had 8 byte names and 3 byte extensions. you could put whatever you want in them, because fat doesn’t give a poo poo, but your os will probably hate you unless you stick to ascii.

at some point Microsoft created a hack to add long file names to fat. they are just fake directory entries that contain more file name. LFNs are long and boring like “Copy of yospos quotes.bak.docx”, but it also had a short file name which was some mangled garbage form of this.

more fun facts: fat can be case sensitive if you want it to be. but windows will barf on a disk written with file names that differ only by case.

fat is cool. you could even say it’s phat. ask questions about fat or just go to Wikipedia

Adbot
ADBOT LOVES YOU

The Management
Jan 2, 2010

sup, bitch?
cool things about fat:

it’s extremely compact on disk, taking up very little overhead.
it takes an extremely small amount of RAM to implement. it will be slow as hell, but if you want fast get more ram.
there are internationalized short file names using code page hacks. it is a clusterfuck of bad decisions.

The Management
Jan 2, 2010

sup, bitch?
I remember upgrading my windows machine to fat32. got so much space back on my 1.6 gig hard drive by going down to smaller clusters, gently caress yeah it was amazing.

The Management
Jan 2, 2010

sup, bitch?

klosterdev posted:

enjoy your poo poo I/O

my io is great, I defrag regularly. thanks for your concern.

The Management
Jan 2, 2010

sup, bitch?

echinopsis posted:

can FAT do TRIM

yes! it’s not really a part of the FS itself, it’s an implementation feature. however you will lose the ability to undelete a file if you trim the fat.

The Management
Jan 2, 2010

sup, bitch?

rear end posted:

Sounds like a piece of poo poo format overall. NTFS is the gold standard for all formats, everywhere, forever.

ntfs has short names too! C:\WINDOWS\PROGRA~1

The Management
Jan 2, 2010

sup, bitch?

suffix posted:

did you know micro$$$HAFT has patents on the fat32 and exfat formats?
pretty hosed up if you ask me

fat32 is over 20 years old so not valid patents there. they do have something in exfat I think.

The Management
Jan 2, 2010

sup, bitch?

ext is at version 4
fat is at version 32

crushing victory for fat. get this incompatible linux garbage file system out of my thread.

Adbot
ADBOT LOVES YOU

The Management
Jan 2, 2010

sup, bitch?

Doc Block posted:

XFS is the real deal, a filesystem developed for supercomputers.

get this FAT and ext poo poo outta here.

this is the fat thread, the thread for the best, most compatible general purpose file system. if you want to make a thread about file systems that lose all your data when your computer crashes, you should make that

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply