Accomplishments

 

  • The first major accomplishment was getting device mapper environment working. Device mapper is a layer between file system and block device and it is configured by a tool called dmsetup in user space. There are some things that need to be done before using dmsetup command. First you need to have a space for a new partition in the disk and format it to ext4(or other common file systems). Second edit the config file in the kernel to make device mapper as a module(recommend) or build into kernel. Then you can specify a mapping strategy for example, linear map by using dmsetup command. In my implementation, I used the simplest way to do dmsetup, just mapping from the start byte to the end byte. Thanks for Sarah's great help which made it a less misserable start for this project.
  • The second major accomplishment was creating a new mapping strategy, which was dm-statistic and allowed it be recognized by dmsetup tool. Sarah suggested me to make it a single file as what she had done before when she did the true-erase work. I, however, chose an another approach. I made it a part of the dm-mod as it is a mapping alrgorithm in the same level as dm-linear and dm-stripe.
  • The third accomplishment was to deal with procfs. It was easy until I found out that it can not deal with data larger than one page size. After searching and learning online, I finally knew that we needed to use an interface called seq_file. The interface simplifies the read operation for procfs file. However, you need to make the data you want to show into a seris of structured data like array, list or hash. In my implementation, I used list, so that the list is consisted of all the bios when mapping.
  • The next accomplishment was adding control on specific bios. The original plan was to do some modification in file system, focusing on transaction. Since it was too complicated to apply, I came up with another idea that we could do some delay if needed when mapping a bio. I followed my idea and it was much easier.
  • Another accomplishment was made after the presentation. Sarah gave me some constructive suggestions to make it more useful, more functional and more completed, like adding reset time function, exporting some functions and being more descriptive on bio structure.
  • I finally implemented all the functions as planned.

.