Re: How the real-time priority take effect?

2010-11-23 Thread Rohit Sharma
...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ -- Thanks and regards, Rohit Sharma Associate Software Engineer Security Technology and Response Symantec Corporation www.symantec.com

Re: How to enable the print timestamping in dmesg

2009-07-11 Thread Rohit Sharma
Hi, In kernel hacking options during menuconfig, u'll get an option for show timing information in printks, check that and compile the kernel. On Sat, Jul 11, 2009 at 10:06 AM, SandeepKsinha sandeepksi...@gmail.comwrote: On Sat, Jul 11, 2009 at 6:50 AM, H M Thalib

Re: Kernel internals.

2009-05-10 Thread Rohit Sharma
On Fri, May 8, 2009 at 5:45 PM, Ole Loots o...@monochrom.net wrote: Hello venkatram ajmeera venkatram ajmeera schrieb: Hai I am interested in learing  linux kernel  internal thouroughly How the interrupt is handled by linux  Kernel. When interrupts occur, the registered interrupt handler

Re: Is it possible to use file descriptor after main returns

2009-04-22 Thread Rohit Sharma
Arun, i suggest that if you are using this for IPC then , better use pipes. And if you really want to use fd in another application then pass the file descriptor to exec after doing a fork. something like this. in application_1 ret = fork(); if(ret == 0){ sprintf(buff, %d, fd_1);

Re: Compile Question

2009-04-05 Thread Rohit Sharma
Linux supports many architectures for its portability. So architecture specific codes resides in arch directory. On Sun, Apr 5, 2009 at 1:57 PM, Stoyan Gaydarov stoyboy...@gmail.com wrote: I compiled my kernel(for x86_64) and i was wondering why it had to create an x86_64 directory under the

Re: understanding the linux code

2009-04-02 Thread Rohit Sharma
If you have better understanding of C language, preprocessor directives usage then you will understand the things more clearly. And as debian developer suggested, if you can provide us with the code snippet may be we can help. ;), also develop a habit of using csope or linux cross reference. On

Re: need help in understanding basics of block device driver

2009-03-07 Thread Rohit Sharma
. Thanks. On Fri, Mar 6, 2009 at 10:02 PM, Rohit Sharma imreckl...@gmail.com wrote: Hi Nidhi Please use, plain text for writing mails to newbies, it does not look good. hi all i was practising writing block device driver from linux device driver 3rd edition but was confused as it gives

Re: need help in understanding basics of block device driver

2009-03-06 Thread Rohit Sharma
at 12:50 AM, Rohit Sharma imreckl...@gmail.com wrote: Hi Nidhi, Seems like you are stuck up with this issue. Refer the following links if you haven't Check out this link to understand block device driver http://lwn.net/Articles/driver-porting/ for bio structures check this link http://lwn.net

Re: need help in understanding basics of block device driver

2009-03-05 Thread Rohit Sharma
Hi Nidhi, Seems like you are stuck up with this issue. Refer the following links if you haven't Check out this link to understand block device driver http://lwn.net/Articles/driver-porting/ for bio structures check this link http://lwn.net/Articles/26404/ in gyst : when you actually transfer

Re: New in kernal programming

2009-02-18 Thread Rohit Sharma
Hi Abhish, If you want to do kernel programming, just get a feel of linux first. Become familiar with commands. Read some nice books like BLP, UTLK and Linux Kernel Development. After you are done with the books you will have a good idea of kernel. Don't forget to learn kernel module programming.

Re: sector size in block device drivers

2009-02-01 Thread Rohit Sharma
Hi Nidhi, i wanted to know where actually is block layer and where is driver where are they separated As far as I know, the differentiation between file system block size and device block size lies in the generic block layer. Generic block layer knows all about, sectors, blocks, segments and

Re: Copying Data Blocks

2009-01-16 Thread Rohit Sharma
Hi Greg, Thanks for such great insights. On Fri, Jan 16, 2009 at 11:41 PM, Greg Freemyer greg.freem...@gmail.com wrote: On Fri, Jan 16, 2009 at 8:26 AM, Sandeep K Sinha sandeepksi...@gmail.com wrote: Hi Greg, On Fri, Jan 16, 2009 at 5:50 AM, Greg Freemyer greg.freem...@gmail.com wrote:

Re: Copying Data Blocks

2009-01-11 Thread Rohit Sharma
. not sure if anyone else have a summary list of blockdevice API and its explanation? not wrt the following cleanup patch, i am not sure how the API will change: http://lwn.net/Articles/304485/ thanks. On Tue, Jan 6, 2009 at 6:36 PM, Rohit Sharma imreckl...@gmail.com wrote: I want to read

Re: Copying Data Blocks

2009-01-09 Thread Rohit Sharma
The idea given by Greg looks perfectly fine, i am going ahead to implement it, I expect to face many challenges while implementing Greg's algorithm because of the way ext2 is designed. I will update you guys soon. On Fri, Jan 9, 2009 at 6:22 AM, Greg Freemyer greg.freem...@gmail.com wrote: HSM

Re: Copying Data Blocks

2009-01-07 Thread Rohit Sharma
and its data blocks and update the dentry with the new inode number. PS: The file system remains completely frozen in this time. On Wed, Jan 7, 2009 at 4:02 AM, Om om.tu...@gmail.com wrote: Erik Mouw wrote: On Tue, 6 Jan 2009 23:16:14 +0530 Rohit Sharma imreckl...@gmail.com wrote: On Tue

Copying Data Blocks

2009-01-06 Thread Rohit Sharma
I want to read data blocks from one inode and copy it to other inode. I mean to copy data from data blocks associated with one inode to the data blocks associated with other inode. Is that possible in kernel space.? -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies

Re: Copying Data Blocks

2009-01-06 Thread Rohit Sharma
On Tue, Jan 6, 2009 at 7:42 PM, rishi agrawal postri...@gmail.com wrote: yes i suppose the donor inode is known moreover the receiver inode's number is also known On Tue, Jan 6, 2009 at 6:54 PM, Manish Katiyar mkati...@gmail.com wrote: On Tue, Jan 6, 2009 at 4:06 PM, Rohit Sharma imreckl

Re: Copying Data Blocks

2009-01-06 Thread Rohit Sharma
On Tue, Jan 6, 2009 at 10:43 PM, Manish Katiyar mkati...@gmail.com wrote: On Tue, Jan 6, 2009 at 10:15 PM, Rohit Sharma imreckl...@gmail.com wrote: On Tue, Jan 6, 2009 at 7:42 PM, rishi agrawal postri...@gmail.com wrote: yes i suppose the donor inode is known moreover the receiver inode's

Re: Copying Data Blocks

2009-01-06 Thread Rohit Sharma
, Rohit Sharma imreckl...@gmail.com wrote: On Tue, Jan 6, 2009 at 10:43 PM, Manish Katiyar mkati...@gmail.com wrote: On Tue, Jan 6, 2009 at 10:15 PM, Rohit Sharma imreckl...@gmail.com wrote: On Tue, Jan 6, 2009 at 7:42 PM, rishi agrawal postri...@gmail.com wrote: yes i suppose the donor inode

Re: Copying Data Blocks

2009-01-06 Thread Rohit Sharma
On Tue, Jan 6, 2009 at 10:58 PM, Manish Katiyar mkati...@gmail.com wrote: On Tue, Jan 6, 2009 at 10:55 PM, Rohit Sharma imreckl...@gmail.com wrote: We can find out no. of block currently being used by the donor inode, The data we read from donor inode has to be in some buffer or page, Since

Re: Copying Data Blocks

2009-01-06 Thread Rohit Sharma
On Tue, Jan 6, 2009 at 11:09 PM, Manish Katiyar mkati...@gmail.com wrote: On Tue, Jan 6, 2009 at 11:06 PM, Rohit Sharma imreckl...@gmail.com wrote: On Tue, Jan 6, 2009 at 10:58 PM, Manish Katiyar mkati...@gmail.com wrote: On Tue, Jan 6, 2009 at 10:55 PM, Rohit Sharma imreckl...@gmail.com wrote

Re: ioctl()

2009-01-05 Thread Rohit Sharma
P. J. Day rpj...@crashcourse.ca Subject: Re: ioctl() To: Rohit Sharma imreckl...@gmail.com Cc: rishi agrawal postri...@gmail.com, sharie...@yahoo.co.in, Kernel newbies kernelnewbies@nl.linux.org Date: Saturday, 3 January, 2009, 8:42 PM On Sat, 3 Jan 2009, Rohit Sharma wrote: ioctls are also

Re: ioctl()

2009-01-04 Thread Rohit Sharma
P. J. Day rpj...@crashcourse.ca wrote: From: Robert P. J. Day rpj...@crashcourse.ca Subject: Re: ioctl() To: Rohit Sharma imreckl...@gmail.com Cc: rishi agrawal postri...@gmail.com, sharie...@yahoo.co.in, Kernel newbies kernelnewbies@nl.linux.org Date: Saturday, 3 January, 2009, 8:42 PM

Re: ioctl()

2009-01-03 Thread Rohit Sharma
ioctls are also known as generic system calls. Its a simple switch case implementation inside a device. you send command and argument through ioctls as parameters. Its a way you use to interact with the device itself. for using it just open the device and use its fd to invoke ioctls. for eg. fd

Re: Freezing File Systems

2009-01-01 Thread Rohit Sharma
That was a very nice explanation Greg, i had the concept that we only suspend write requests during freeze. Thanks for clearing my doubt. Rishi if you can state the purpose, why you want to freeze the file system would be more helpful. On Thu, Jan 1, 2009 at 4:34 AM, Mark Brown

Re: I/O operations

2008-12-31 Thread Rohit Sharma
On Wed, Dec 31, 2008 at 5:53 PM, rohit vashist rohitvashist2...@gmail.com wrote: Hi I want to know exactly what number of I/O operations are currenty being on device,both for synchronous and asynchronous ? I went through aio.c and found a relevant field for this in struct aio_setup_ring,thats

Re: I/O operations

2008-12-31 Thread Rohit Sharma
On Thu, Jan 1, 2009 at 1:08 AM, Rohit Sharma imreckl...@gmail.com wrote: On Wed, Dec 31, 2008 at 5:53 PM, rohit vashist rohitvashist2...@gmail.com wrote: Hi I want to know exactly what number of I/O operations are currenty being on device,both for synchronous and asynchronous ? I went

Re: Freezing File Systems

2008-12-31 Thread Rohit Sharma
May be remounting the file system in read only mode will help. try this: # mount -o remount,ro filesystem On Wed, Dec 31, 2008 at 8:36 PM, rishi agrawal postri...@gmail.com wrote: as far as i have understood it is not freezing the file system but it is only freezing the write operation on

Re: Freezing File Systems

2008-12-31 Thread Rohit Sharma
On Thu, Jan 1, 2009 at 2:04 AM, Rohit Sharma imreckl...@gmail.com wrote: May be remounting the file system in read only mode will help. try this: # mount -o remount,ro filesystem Yes this works, after remounting the file system in read only mode you cant create new files and you cant even

Re: block allocation for ext2_mkdir

2008-12-22 Thread Rohit Sharma
On Mon, Dec 22, 2008 at 6:22 AM, Peter Teoh htmldevelo...@gmail.com wrote: On Sun, Dec 21, 2008 at 1:20 PM, Sandeep K Sinha sandeepksi...@gmail.com wrote: Thanks a lot Peter for taking out time and looking into the issue at such a deeper level. Thanks again, u are welcome.it both my

find_group_orlov()

2008-12-22 Thread Rohit Sharma
This is a code snippet from find_group_orlov() in ialloc.c of ext2 fs I am not able to figure out the percpu counters, why it is used. if (ndirs == 0) ndirs = 1; /* percpu_counters are approximate... */ blocks_per_dir = (le32_to_cpu(es-s_blocks_count)-free_blocks)

Re: block allocation for ext2_mkdir

2008-12-21 Thread Rohit Sharma
AM, Rohit Sharma imreckl...@gmail.com wrote: in ext2/balloc.c i saw a function ext2_new_blocks() its the core function to allocate blocks, it has been specified there. So all the blocks that are allocated in the file system is through this function only , am i correct

ext2_block_alloc_info

2008-12-20 Thread Rohit Sharma
A little confusion. Just refer this structure in linux/ext2_fs_sb.h struct ext2_block_alloc_info { 46/* information about reservation window */ 47struct ext2_reserve_window_node rsv_window_node; 48/* 49 * was i_next_alloc_block in ext2_inode_info 50

Re: ext2_block_alloc_info

2008-12-20 Thread Rohit Sharma
Thanks for figuring it out. :) It was a very helpful information. On Sun, Dec 21, 2008 at 1:10 AM, Sandeep K Sinha sandeepksi...@gmail.com wrote: Hi Rohit, On Sat, Dec 20, 2008 at 9:13 PM, Rohit Sharma imreckl...@gmail.com wrote: A little confusion. Just refer this structure in linux

Re: block allocation for ext2_mkdir

2008-12-19 Thread Rohit Sharma
On Fri, Dec 19, 2008 at 3:05 PM, Peter Teoh htmldevelo...@gmail.com wrote: On Fri, Dec 19, 2008 at 3:42 PM, Rohit Sharma imreckl...@gmail.com wrote: On Fri, Dec 19, 2008 at 4:09 AM, Jan Kara j...@suse.cz wrote: On Fri, Dec 19, 2008 at 12:12 AM, Rohit Sharma imreckl...@gmail.com wrote: How

Re: block allocation for ext2_mkdir

2008-12-19 Thread Rohit Sharma
Is there a difference between how ext2 allocates block between inode's indirect blocks and data blocks. On Fri, Dec 19, 2008 at 8:59 PM, Peter Teoh htmldevelo...@gmail.com wrote: On Fri, Dec 19, 2008 at 7:18 PM, Rohit Sharma imreckl...@gmail.com wrote: On Fri, Dec 19, 2008 at 3:05 PM, Peter

block allocation for ext2_mkdir

2008-12-18 Thread Rohit Sharma
How does ext2 allocate blocks for directory. ext2_mkdir callsext2_make_empty ext2_make_empty calls __ext2_write_begin __ ext2_write_begin calls block_write_begin my query is that how does this function allocates blocks for directories. ?? --

Re: block allocation for ext2_mkdir

2008-12-18 Thread Rohit Sharma
On Fri, Dec 19, 2008 at 12:12 AM, Rohit Sharma imreckl...@gmail.com wrote: How does ext2 allocate blocks for directory. ext2_mkdir callsext2_make_empty ext2_make_empty calls __ext2_write_begin __ ext2_write_begin calls block_write_begin

Re: block allocation for ext2_mkdir

2008-12-18 Thread Rohit Sharma
On Fri, Dec 19, 2008 at 4:09 AM, Jan Kara j...@suse.cz wrote: On Fri, Dec 19, 2008 at 12:12 AM, Rohit Sharma imreckl...@gmail.com wrote: How does ext2 allocate blocks for directory. ext2_mkdir callsext2_make_empty ext2_make_empty calls

Re: tty driver read implementation

2008-12-05 Thread Rohit Sharma
I think Clists are used in tty read. Its a list of Cblocks.( C stands for character). They are meant to read from slower devices. Whenever you enter or read characters, Cblocks hold the data CBlocks are again a list of character and the head shows the start of valid data. for eg :4,8 | 0 |

Re: inode and blocks

2008-09-30 Thread Rohit Sharma
On Mon, Sep 29, 2008 at 10:54 PM, Sunil [EMAIL PROTECTED] wrote: On Mon, Sep 29, 2008 at 8:03 PM, Rohit Sharma [EMAIL PROTECTED] wrote: Not an assignment actually, but a project. We are working on open hierarchical storage management, in which we store files on disks according to different

Re: inode and blocks

2008-09-29 Thread Rohit Sharma
on disk 2, then we place them accordingly in different disks. On Mon, Sep 29, 2008 at 2:31 AM, Theodore Tso [EMAIL PROTECTED] wrote: On Sun, Sep 28, 2008 at 03:49:04PM +0530, Rohit Sharma wrote: Suppose i have a file named abc.txt and i want to specify that all the *.txt files must be allocated

inode and blocks

2008-09-28 Thread Rohit Sharma
Suppose i have a file named abc.txt and i want to specify that all the *.txt files must be allocated between block groups no. 100 - 200 in ext2 fs. Is there a way to do this? can we modify function ext2_new_inode and find_group_orlov for this? -- To unsubscribe from this list: send an email

vfsmount

2008-09-22 Thread Rohit Sharma
I am interested in getting the vfsmount structure of the mounted file system from my module. I used filp = get_empty_filp() (filp is file pointer) function to create an empty file object (as this contains pointer to vfsmount structure) file object has a field f_vfsmnt which points to the vfsmount

Reading inode..

2008-09-17 Thread Rohit Sharma
I want to read ext2 inode. Its just like i have a inode no. say 1900.. so from the block group we can read the group descriptor and from there we can identify the first block no. of the inode table. So we can read the required inode no.i.e. 1900 from this inode table. I found that there are 8176

Re: reading superblock

2008-09-16 Thread Rohit Sharma
there. Any other method in kernel space?? Regards, Ashish --- On Mon, 15/9/08, Rohit Sharma [EMAIL PROTECTED] wrote: From: Rohit Sharma [EMAIL PROTECTED] Subject: reading superblock To: Kernelnewbies kernelnewbies@nl.linux.org Cc: ext4 [EMAIL PROTECTED] Date: Monday, 15 September, 2008, 10

Fwd: Request queues and bio structures

2008-09-10 Thread Rohit Sharma
-- Forwarded message -- From: Rohit Sharma [EMAIL PROTECTED] Date: Wed, Sep 10, 2008 at 10:57 PM Subject: Re: Request queues and bio structures To: Peter Teoh [EMAIL PROTECTED] What i figured out is when a request for reading blocks is made then two possibilities are there 1

Kernel Module Profiling

2008-08-11 Thread Rohit Sharma
I am trying to build my own profiler for kernel module, I have thought of creating a deamon that will profile any kernel module that is invoked, by monitoring the resources like memory usage, time stamp, etc, at that time. Deamon will be invoked when inserting our module with insmod -d And i

Identifying functions

2008-08-11 Thread Rohit Sharma
Is there a way to find out which function is being called by examining executabls files or binary files ? i think we can do that but not able to figure out how. -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to [EMAIL PROTECTED] Please read the FAQ at

ext2_find_near

2008-07-29 Thread Rohit Sharma
I was going through the function ext2_find_near in inode.c and could not interpret the meaning of the last part of this code : static ext2_fsblk_t ext2_find_near(struct inode *inode, Indirect *ind) { struct ext2_inode_info *ei = EXT2_I(inode); __le32 *start = ind-bh ? (__le32 *)