Find the answer to your Linux question:
Results 1 to 7 of 7
Hi all, I'm new to Linux. I compiled and installed the linux kernel version 2.6.27.39. I'm trying to limit the number of bytes that can be read/written for the read/write ...
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    16

    system call to change read/write byte capacity

    Hi all,
    I'm new to Linux. I compiled and installed the linux kernel version 2.6.27.39. I'm trying to limit the number of bytes that can be read/written for the read/write system calls. I'm trying to write a system call to do this. I found many guides online on how to write a system call, but I have no idea how to proceed with the above.
    The functionality should also exist for fork()ed child processes.

    Any ideas on where to start would be helpful.
    Thanks!

  2. #2
    Just Joined!
    Join Date
    Nov 2008
    Location
    Virginia, USA
    Posts
    18
    I have no idea. But, I'm pretty sure this doens't belong in the Linux Newbie section. lol

  3. #3
    Just Joined!
    Join Date
    Nov 2009
    Posts
    16
    well where do i post it then?

  4. #4
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Smile

    Welcome to LF, redeemed2009 !!!

    Quote Originally Posted by redeemed2009 View Post
    I'm trying to limit the number of bytes that can be read/written for the read/write system calls.
    I don't understand this feature, as far i remember you can pass this as parameter to read/write sys calls. Could you please explain more about your goals.
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  5. #5
    Just Joined!
    Join Date
    Nov 2009
    Posts
    16
    Hi Lakshmipathi,
    I will try to elaborate. I'm trying to implement a system call to set a maximum limit on the number of bytes that can be read or written for the read and write system calls on the caller. forked processes should inherit the limit of their parent.

    Does that clear up things a bit? I'm sorry, but I'm also trying to get my head around this as I'm new to Linux myself.

  6. #6
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Red face

    In case ,if you trying to set a limit (say read can return max. 512 bytes) anything above (1KB) that will produce an errror message. oops ! sorry - I don't have clue about that.

    May be something to do with kernel file tables or process tables...may be wait for some LF member to answer your questions else drop a mail to kernel developer/user mailing list.
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  7. #7
    Just Joined!
    Join Date
    Nov 2008
    Location
    Virginia, USA
    Posts
    18
    Quote Originally Posted by redeemed2009 View Post
    well where do i post it then?
    Probably in Linux Programming & Scripting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...